Hi - First post here.
I'm trying to search a string for all values enclosed in a tilde ~. But its not working the way I expected. With the test string:
myString = this is a ~test~ ~some~ of the values are ~enclosed~ in a ~tilde~ symbol
I would have expected it to find these words:
test some enclosed tildeBut it only finds ~test~.
Is what I'm trying to do even possible? If it is, I would love it if someone could help me understand why the attached code doesn't work. Its bugging the heck out of me!
CODE
<cfset myString = "this is a ~test~ ~some~ of the values are ~enclosed~ in a ~tilde~ symbol">
<cfset result = reFindNoCase("~([^~]*)~", myString, 1, "true")>
<cfoutput>
myString = #myString#<br>
results:<br>
<cfloop from="1" to="#arrayLen(result.pos)#" index="i">
#mid(myString, result.pos[i], result.len[i])#<br>
</cfloop>
</cfoutput>