Negative lookup assertion should match to be validate.
If "Wxy" not match, the positive assertion failed.
If you want a Capital letter followed by a dash but not followed by 3
lower case, you should match "not 3 lower case"
([A-Z]-)(?![^a-z]{3})([a-z0-9]* )
Regards
Arian Hojat a ��crit��:
Hello all,
had a question/possible bug report...
For the example on this webpage:
http://www.nuclearblender.com/leftovers/howto/regex/
this pattern is presented and i tried a positive lookup assertion which
worked, but this first negative one only matched the first pattern
(global option is on btw, so not sure why wont match).
Pattern: ([A-Z]-)(?![a-z]{3})([a-z0-9]* )
Text to lookup: A-xyz37 # B-ab6142 # C-Wxy66 # D-qrs93
Should
match B-ab6142 and C-Wxy66 as they both (have a capital letter followed
by a dash), then (dont have 3 lower case letters), and (are following
by letters/numbers and a space)
only matches first one in the program.
Thanks, let me know if it should match only one if im wrong. Running
latest version on Windows XP.
Great Tool!
Arian
_______________________________________________
regex-coach site list
regex-coach@common-lisp.net
http://common-lisp.net/mailman/listinfo/regex-coach
--
---------------------------------------------------------------------
Sorry, This disclamer is auto added by my company's FW
---------------------------------------------------------------------