User Guide Cancel

ReEscape

 

Description

Takes a string and escapes characters that match regular expression control characters.

Returns

String appended with the escape characters

History

ColdFusion 10: Added this function

Syntax

reEscape(string
_)
reEscape(string _)
reEscape(string
_)

Properties

Parameter

Description

string

The string in which you have to escape characters that match regular expression characters.

Example

<cfoutput>
#reescape("*.{}[]exam?ple")#
</cfoutput>
<cfoutput> #reescape("*.{}[]exam?ple")# </cfoutput>
<cfoutput> 
#reescape("*.{}[]exam?ple")# 
</cfoutput>

Get help faster and easier

New user?