JavaVerbalExpressions icon indicating copy to clipboard operation
JavaVerbalExpressions copied to clipboard

anythingBut("abb") does not generate correct result when more than 1 character

Open Miglecz opened this issue 9 years ago • 2 comments

Actually generated: (?:[^abb]*) Expected to be generated: (?:a(?!bb)|[^a])+ or something like that.

Miglecz avatar Aug 03 '16 10:08 Miglecz

can you provide complete example on how it should work?

lanwen avatar Aug 09 '16 13:08 lanwen

I guess, the OP interprets anythingBut("abb") as any character, but not looking at "abb", and the thing repeated, i.e., (?:(?!abb)(?s:.))+ which is equivalent to his expression (modulo mistakes I may have done), but doesn't make much sense to me.

Maaartinus avatar Dec 23 '16 07:12 Maaartinus