An existing interface requires a Pattern
instance for matching labeled items, but I want to ignore all items at some point. Pattern
has no constant NO_MATCH
, DISCARD_ALL
or something similar.
Currently I use this:
Pattern.compile("^.^")
Is there a better solution?
(PS, sadly, java's regex engine lacks support for backtracking controls like (*FAIL)
.)