sashank
sashank

Reputation: 1541

Transitioning Perl regexes to POSIX regexes

I have tried the Fire/J Regular expression library and results have been awesome. Fire/J uses POSIX compliant regular expressions but our current library uses Perl5Matcher which is not POSIX compliant. We have hundreds of regexes to transition, so are there any tools to translate Perl compatible regular expressions to POSIX compliant?

Upvotes: 2

Views: 259

Answers (1)

Tim Pietzcker
Tim Pietzcker

Reputation: 336148

This might be difficult, depending on what features your regexes use. Perl has a lot of regex features that don't work in the very restricted POSIX regex environment.

But if a translation is possible, there is one tool that can do this: RegexBuddy

On the other hand, Java natively supports a much larger subset of Perl's regex features, so why not use RegexBuddy to translate the regexes into the Java flavor?

Upvotes: 2

Related Questions