my prob is parsing a querystring in php, that can start with
a '?' or
with nothing(case1/2):
case1:
$data="?name=somthing&type=else&community=com
munityABC&";
case2
$data="name=somthing&type=else&community=comm
unityABC&";
i try to make a backward assertion, but it seems not to
recognize the
\\^ as line start in the character class there:
$strParamPattern="/(?<=[?\\^&;]{0,1})[^=?&am
p;;]+=[^=?&;\\$]+(?=[\\$&;])/";
preg_match_all($strParamPattern, $data, $result,
PREG_SET_ORDER);
in case1 i get the correct 3 results, in case2 the first one
is
missing.
this arouse the question to me: is it possible to include
the start of
line-circumflex in a character-class?
same question for the end-of-line-$, as it seems of no
difference if i
use '\\$' or '$' in the later character classes.
thanks for your suggestions.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Regex" group.
To post to this group, send email to regex googlegroups.com
To unsubscribe from this group, send email to
regex-unsubscribe googlegroups.com
For more options, visit this group at http://groups.go
ogle.com/group/regex
-~----------~----~----~----~------~----~------~--~---
|