Are there any (free) regular expression engines for Java, that can compile a regular expression to a DFA, and do group capturing while matching the DFA ?
I've found dk.brics.automaton and jrexx, which both compile to DFA, but neither seems to be able to do group capture. While the other engines I've found seem to compile to NFA.
try this one (probably not DFA but faster than java.util) http://jregex.sourceforge.net/gstarted-advanced.html#ngroups, or this one: http://userguide.icu-project.org
according to that test: http://tusker.org/regex/regex_benchmark.html, both are fast (we all know that the benchmarks only tests what the creator of the benchmark wanted to test).
When I needed really fast DFA regex I have spawned a process that used grep ;-) (For a 6GB log file it cut my times from 10minutes to a few seconds).
I recently wrote one: tree-regex.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With