0

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).)

Dávid Horváth
  • 4,050
  • 1
  • 20
  • 34

0 Answers0