The last time I looked at Java regex matching code while debugging, the Java 7 regex engine used the Boyer-Moore algorithm for sequences of matches of literal text. Thus, the easiest way to find Stringusing Boyer-Moore is to prepare using p=Pattern.compile(searchString, Pattern.LITERAL)and search using p.matcher(toSearchOn).find(). No third-party libraries and no manual work is required. And I believe that the JRE classes are well tested ...
source
share