Sorcerer's Isle cfRegex Documentation

Installation

How to install cfRegex depends on the CFML engine you are using.

Each CFML engine currently has its own download, with code tailored for it, so be sure to download the package corresponding to the CFML engine you use!

If you work on multiple engines, you will need to download the code for each one. You can download all of them in a single package.

A future release will hopefully provide a unified download (for the recent CFML engines), but this is not yet available.

All download packages are available from the project's homepage.

ColdFusion 9.0.1 and above

Tag and Object - Manual Setup

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

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

Functions - Manual Setup

Unfortunately there is no way in CF to auto-include user-defined functions, so this must be done manually on each request. This is not ideal, but - unless there is a way I am unaware of, or if Adobe adds such functionality - there is no way to avoid it.

  1. Inside {coldfusion-root}/CustomTags create a cfregex-functions directory.
  2. Move all remaining .cfm files 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!

Open BlueDragon 2.0

Tag and Object - Manual Setup

  1. Download the archive and extract to a temporary location.
  2. Locate your OpenBD WEB-INF directory (e.g. {openbd-root}/webapps/openbd/WEB-INF).
  3. Move 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

Unfortunately I have not yet created an OpenBD plugin, which will allow functions to be installed as core functions. In the meantime, it is necessary to include the functions manually on each request.

  1. Inside {openbd-root}/webapps/openbd/WEB-INF/CustomTags create a cfregex-functions directory.
  2. Move all remaining .cfm files to {openbd-root}/webapps/openbd/WEB-INF/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!

Lucee / Railo 3.2.2 and above

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

Manual Setup Instructions

  1. Download the archive 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 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, that is {webroot}/WEB-INF/lucee