I have this pattern for my command-line program:
^s?([/|@#])(?:(?!\\1).)+\\1(?:(?!\\1).)*\\1(?:(?:gi?|ig)?(?:\\1\\d\\d?)?|i)?$
based on ECMAScript 262
f
There seems to have been a bug in GCC that got fixed in version 5.4. My guess is you are running an older version on your Windows set-up.
See the difference in output in:
It does not seem to make a difference whether boost
is included or not.
The bug is related to (?!\\1)
, as replacing it by (?![/])
(in both instances) solves the issue, but obviously that would limit the regular expression for use with the /
delimiter only:
Also, the bug appears with this simple regular expression: (.)((?!\\1).)
which should reject an input like aa
:
Conclusion: make sure to install GCC version 5.4 or higher.