[tpm] looking for a regex that returns true on no match
Fulko Hew
fulko.hew at gmail.com
Thu Mar 12 07:04:12 PDT 2009
Alex asked:
> Couldn't you just use the ~! on the regex instead of ~=?
Nope, see below.
On Thu, Mar 12, 2009 at 9:53 AM, Dave Doyle <dave.s.doyle at gmail.com> wrote
> Is this because the regexes are being fed in from an external source?
Well the data is a given set, and the regex pattern is what I'm trying to
develop
> Do you have control of that source?
Nope
Basically there is a simple regex engine somewhere else that says
if (/$regex/) {print "match"; } else { print "no match"; }
and I need a regex pattern that is the 'NOT the given string' pattern.
So for the given the data set: 'bad', 'soso', 'maybe', and 'good'
I need to be able to say... 'return true if its anything but "good"'.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/toronto-pm/attachments/20090312/bbb964d2/attachment.html>
More information about the toronto-pm
mailing list