Sorcerer's IsleDocs cfRegexOverviewCode

Installation

Installing cfRegex is not required - You can use Regex.cfc as a standard component in the same way as any other CFC - i.e. it can be created as new Regex(...) by scripts in the same directory or via a server/application mapped path.

However, if you want cfRegex to be available globally for all applications without a mapping, you need to install it by copying files to relevant locations.

Previous releases had individual packages for each CFML engine, but from v0.3 there are only two packages: one which supports Lucee, and a legacy package which works on otherwise discontinued CFML engines (OpenBD, Railo, ColdFusion 9)

NOTE: cfRegex has not been tested against Adobe ColdFusion 2016 or newer - it might work, or it might not. If this is important to you, get in touch to discuss options.

Lucee / Railo

Manual Setup Instructions

  1. Download cfRegex v0.4 and extract to a temporary location.
  2. Locate your {lucee-server}/context/ directory (e.g. {lucee-root}/lib/ext/lucee-server/context). *
  3. Copy Regex.cfc to {lucee-server}/context/components/ directory.
  4. Copy Regex.cfc to {lucee-server}/context/library/tag/ directory.
  5. Copy functions/Regex*.cfm to {lucee-server}/context/library/function/ directory.
  6. Restart the Lucee server.

You can now use the cfregex tag, create Regex objects, and use all the Regex~ functions as if they were built-in functions.

*For per-context installation (or, if you do not have a {lucee-server}/context/components directory), in steps 3..5 above use the {lucee-web} directory, which defaults to {webroot}/WEB-INF/lucee

(For Railo installation, read "railo" for every instance of "lucee" above.)

ColdFusion 9.0.1 and above

Tag and Object - Manual Setup

  1. Download cfRegex v0.4 legacy and extract to a temporary location.
  2. Locate your ColdFusion root directory, referred to as {coldfusion-root} below.
  3. Copy Regex.cfc to {coldfusion-root}/CustomTags/
  4. Copy Regex.cfc and regex.cfm to {coldfusion-root}/wwwroot/WEB-INF/cftags/

You can now use the cfregex tag and create Regex objects.

Open BlueDragon 2.0

Tag and Object - Manual Setup

  1. Download cfRegex v0.4 legacy and extract to a temporary location.
  2. Locate your OpenBD WEB-INF directory (e.g. {openbd-root}/webapps/openbd/WEB-INF).
  3. Copy Regex.cfc and regex.cfm to {openbd-root}/webapps/openbd/WEB-INF/CustomTags/

You can now use the cf_regex tag and create Regex objects.


Functions - Manual Setup (ColdFusion and Open BlueDragon)

This process is the same for both ColdFusion and Open BlueDragon - the only difference is the location of the CustomTags directory.

For ColdFusion use {coldfusion-root}/CustomTags and for Open BlueDragon use {openbd-root}/webapps/openbd/WEB-INF/CustomTags

  1. Locate the CustomTags directory create a cfregex-functions directory.
  2. Copy functions/*.cfm to {coldfusion-root}/CustomTags/cfregex-functions/
  3. Create a mapping /cfregex-functions to this directory.
  4. At the start of every request, do:
    <cfinclude template="/cfregex-functions/include-all.cfm" />

Now you can also use the functions!