Did anyone come across Java version of Google's regular expression library RE2 or a java library with similar capabilities and good performance? The performance requirement is linear time with regard to the length of regular expression and the input text length.
Clarification
Most regular expression implementation use a backtracking algorithm to match the input text and hence are exponential on some simple regular expressions like (.*).(.*).(.*).(.*)
. RE2 is a library from google that solves this problem by using an algorithm that varies linearly with input size using the concepts of Automata theory. The questioner wants to know whether there exists libraries for Java that are based on this algorithm.