I'm in need of PCRE functionality for my regular expressions in Java. I've been unable to find such a library. What is an extended library (Hopefully including more of the PCRE constructs and extends of vanilla java.util.regex.Pattern capabilities)?

  • Hmm… could you address libpcre via JNI? Sure, absolutely utterly evil and unportable and unidiomatic…
    – mirabilos
    Dec 23, 2014 at 16:57

1 Answer 1


I have found JRegex. It seems to include the set of syntax from Perl5.6 regular expressions (Version 8 perlre), with special syntax for named backreferences and in-pattern comments. However it is not very reliable and runs into infinite loops in typical zero-length matches, which is unfortunate.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.