Whatever message this page gives is out now! Go check it out!
REReplace("There is is coffee in the the kitchen",
"[ ]+([A-Za-z]+)[ ]+\1"," * ","ALL")There * coffee in * kitchen"([A-Za-z ]+)\1","\1") |
"There is a cat in in the kitchen" |
"([A-Za-z ]+)\1","\1","ALL") |
"There is a cat in the kitchen" |
<cfset newString = REReplace("#astring#", "(apples) and (pears)", "\2 and \1","ALL")> |
"pears and apples, pears and apples, pears and apples" |
| Special character | Description |
\u | Converts the next character to uppercase. |
\l | Converts the next character to lowercase. |
\U | Converts all characters to uppercase until encountering \E. |
\L | Converts all characters to lowercase until encountering \E. |
\E | End \U or \L. |
REReplace("HELLO", "([[:upper:]]*)", "Don't shout\scream \L\1")<cfset replaceString = "\1 Mr.\2">
<cfset string = "Hello Bond">
#REReplace(string, regex, replaceString)#