[TRE-general] Why Retest fail on these?
Ville Laurikari
ville at laurikari.net
Wed Feb 21 14:13:12 EET 2007
On Wed, Feb 21, 2007 at 09:59:06AM -0300, OcTweak wrote:
> If \xhh does not work inside [],
> how does retest correctly works for the following:
>
> test_comp("[\\x30\\x31]\\x41", REG_EXTENDED, 0);
> test_exec("0ABC", 0, REG_OK, 0, 2, END);
> test_exec("1ABC", 0, REG_OK, 0, 2, END);
> test_exec("2ABC", 0, REG_NOMATCH);
This one "works" because [\x30\x31] will match any of \, x, 0, 1, or 3.
> test_comp("[^\\x30\\x31]\\x41", REG_EXTENDED, 0);
> test_exec("0ABC", 0, REG_NOMATCH);
> test_exec("1ABC", 0, REG_NOMATCH);
> test_exec("2ABC", 0, REG_OK, 0, 2, END);
This one "works" because [^\x30\x31] will match anything but one of \,
x, 0, 1, and 3.
--
http://www.iki.fi/vl/
More information about the TRE-general
mailing list