Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ReFindNoCase() question 1

Status
Not open for further replies.

FALCONSEYE

Programmer
Jul 30, 2004
1,158
US
I have a string which has [something]|Somehere ....
i want to get the value between [ and ] which is something. so, i tried using

<cfset kPos = RefindNoCase("[",myString,1)>
<cfset k2Pos = REFindNoCase("]",myString,kPos+1)>

to get the positions of the [ and ]. however the above code throws an error


Malformed regular expression "[".
Reason: Unmatched [] in expression..

how can i accomplish this? thanks
 
<cfset kPos = RefindNoCase("\[",myString,1)>
<cfset k2Pos = REFindNoCase("\]",myString,kPos+1)>

We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true.
 
i used this one instead thanks
RefindNoCase("[]|]",myObj1,1)>
 
you really only want to use reFindNoCase if you're looking for a pattern (regex)

var1 = find("[", myObj1)
var2 = find("]", myObj1,var1)

We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top