OT: RE madness
Hello.
I've been playing around with these two REs in Perl with no
success. Can anyone tell me what's wrong?
This works:
!~ /^(?:red|blue)$/
and will match everything except any of the two fixed strings
"red" or "blue" or any combination thereof. "black" matches,
as does "blu", because it's neither red nor blue.
Then I wanted to convert the above expression to a "positive"
match, like this:
=~ /^[^(?:red|blue)]$/
which fails. Why is this? Is there no way of saying "neither/nor",
just "either/or"?
Thanks,
andrej
--
echo ${girl_name} > /etc/dumpdates
Reply to: