Sorcerer's Tower

Java RegEx Utilities

I have just released Java RegEx Utilities on RIAForge, which is a CFC enabling easy access to Java Regular Expression functionality, adding to what is available in the standard CFML functions.

Currently there are two main functions.

jre.get(Text,RegEx) returns the matches to the regular expression as an array.

jre.replace(Text,RegEx,Replacement) is similar to REReplace, but the Replacement argument can be a function pointer, allowing you to process the results of a regex match with a function

You can find more usage details on the jre-utils wiki, which I plan to update with some examples of when each of these functions can be useful.

I have tested jre-utils against Railo 2 and CFMX 7, but it should also work with ColdFusion 8 and the Java version of BlueDragon - if anyone can test/confirm this please let me know.

Download Java RegEx Utilities from RIAForge.