Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trycf/916579ab2dbe0d8eac229bfd45aa4c33 to your computer and use it in GitHub Desktop.
Save trycf/916579ab2dbe0d8eac229bfd45aa4c33 to your computer and use it in GitHub Desktop.
TryCF Gist
<cfset test = 'a~b~~c~d~~~e'>
<cfset test2 = reReplace(test, '~(?=~)','~X','all')>
<cfoutput>
test #test#
<br> test2 #test2#
<br>wanted: a~b~X~c~d~X~X~e
</cfoutput>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment