samsouder / reggy

Objective-C interactive regular expression validator and tester for OS X.
http://reggyapp.com
356 stars 24 forks source link

negated character class #21

Open massimilianodesimone opened 10 years ago

massimilianodesimone commented 10 years ago

It seems to me that Reggy does not detect negated character classes properly. The regex \b[^a-b]{4}\b matches four letter words that do not contain the range [a-b].

regex_1

Above, Reggy matches the words 'been' and 'beck', which are four letter but contain the letter 'b'.

regex_2

If I tick the "Match Case" check box, Reggy does not match anymore the words 'bean' and 'beck'.

jimmedlen commented 9 years ago

similar issue with a negated class any non-word character and not a space should not include the letter 'a'

screen shot 2014-10-21 at 4 12 42 pm