Lets say I have a string The big brown fox jumped<br> over the fence. How could I specify that I want to keep only the characters that are before the <br> tag, stripping out the rest?
Lets say I have a string The big brown fox jumped<br> over the fence.
Share
I use something similar, don’t know if it’s more efficient.
I like it because I determine the output prior to output rather than on output. But orangepips is nice because you could tailor your output based on the context..
EDIT
As pointed out in the comments the above code indeed produces "The" because of the way CF treats each character as a delimiter.
But
<cfset firstPiece = listGetAt(string, 1, "<")produces "The big brown fox jumped".From the CF Documentation