Actions
What is an Action?
In the cfRegex project, the term "action" is used to represent a trinity of
available implementations for functionality: a function, an object method, and a
tag action.
Although, technically, all actions have been implemented using the cffunction
tag, for clarity only the Regex~ functions are referred to as "functions",
any actions used via the Regex Object are referred to as "methods", or
tag-form when using cfregex.
So, if you see "the X action" references, this refers to all implementations
of X, whilst "the X function" is only applying to the function (but not the
Object method nor tag-forms).
List of Actions
- Compile creates a Regex Object for when a regex is needed multiple times.
- Escape returns a literal representation of the regex pattern, allowing use within another regex.
- Find returns the character positions at which the regex is found.
- Match returns an array containing each regex match.
- Matches returns a boolean indicating if the regex exactly matches the text.
- Quote returns a quoted version of the regex, for use in another regex pattern.
- Replace returns the input text with any matches replaced by a string or function result.
- Split returns an array after treating the regex as a delimiter against the input text.