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-server}/context/
directory (e.g. {lucee-root}/lib/ext/lucee-server/context
). *Regex.cfc
to {lucee-server}/context/components/
directory.
Regex.cfc
to {lucee-server}/context/library/tag/
directory.
functions/Regex*.cfm
to {lucee-server}/context/library/function/
directory.
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-root}
below.
Regex.cfc
to {coldfusion-root}/CustomTags/
Regex.cfc
and regex.cfm
to {coldfusion-root}/wwwroot/WEB-INF/cftags/
You can now use the cfregex tag and create Regex objects.
{openbd-root}/webapps/openbd/WEB-INF
).
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.
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
cfregex-functions
directory.
functions/*.cfm
to {coldfusion-root}/CustomTags/cfregex-functions/
/cfregex-functions
to this directory.
<cfinclude template="/cfregex-functions/include-all.cfm" />
Now you can also use the functions!