[haXe] haXe regexp and subexpressions
Nicolas Cannasse
ncannasse at motion-twin.com
Thu Apr 5 16:55:22 CEST 2007
> Hello Nicolas,
>
> Hmm, going on with research...
>
> static var text = ~/[^\x0A\x0D]/;
> static var quoted_pair = ~/a$text/;
>
> trace(quoted_pair.match("ab"));
>
> results in false... As far as I understand, text allows any
> character except for newline, and quoted_pair should just allow any
> 2-char string s with s[0] == 'a' and s[1] not a newline. Anything
> wrong?
Ok, I didn't remember about the $ident meaning in perl.
For first expression, you can use ~/[^\r\n]/ , it should be ok.
For second one, the only option left is to create the regexp with 'new
Ereg' expression.
Nicolas
More information about the Haxe
mailing list