I\'m learning an advanced usage of regex and noticed that many posts use (*SKIP)
or (*F)
in it.
I posted a question where the idea was to m
The (*SKIP)
and (*F)
(aka *FAIL
) patterns are documented in the Perl manual: http://perldoc.perl.org/perlre.html
However, they are only available in Perl and in flavours of regex that imitate Perl (for example the PCRE library used by PHP).
Java's built in regex engine does not support these extensions, and I am not aware of one that does.
My general advice in Java is to keep your regular expressions simple, and use other string manipulation methods to achieve what can't be done clearly with a short regex.