evergreean
Technical User
How can I fetch something in a string? Below takes the part I want out. But I want to take the part
I want out and then output it:
For example if I have a string such as: (hello)<h2>@ information
then I want grab just this part: <h2>@
and output it just by it self:
<h2>@
My attempt does the opposite and strips the <h2>@ out of the string:
gives me output of: (hello) information
Please advise.
I want out and then output it:
For example if I have a string such as: (hello)<h2>@ information
then I want grab just this part: <h2>@
and output it just by it self:
<h2>@
My attempt does the opposite and strips the <h2>@ out of the string:
Code:
<cfset theData = "(hello)<h2>@ information">
<cfset wrd = ReReplace(theData, "<h2>@", "", "All")>
<cfoutput>#wrd#</cfoutput>
gives me output of: (hello) information
Please advise.