Lucee Function Reference

rereplace()

Uses a regular expression (RE) to search a string for a string
pattern and replace it with another. The search is
case-sensitive.

Example

rereplace(string string,string regex,string substring,[string scope]):string

Category

string,regex

Arguments

The arguments for this function are set. You can not use other arguments except the following ones.
Name Type Required Default Value Description
string string  Yes   String within which to search.  
regex string  Yes   Regular expression to replace.  
substring string  Yes   replacement  
scope string  No one - one (default): Replace the first occurrence of the regular expression.
  • all: Replace all occurrences of the regular expression.