Skip to main content
June 6, 2012
Question

finding html tags

  • June 6, 2012
  • 1 reply
  • 512 views

Hi All -

I am trying to find if a particular string has html tags in it. For example

<cfset myStr = "<p>Hello WOrld</p>">

I am using the following line of code to see if p tags exist

<cfoutput>#FindNoCase("<p>",htmlCodeFormat(myStr))#</cfoutput>

The above always returns 0. Do I need to use regex to achieve the desired result?

Thanks

This topic has been closed for replies.

1 reply

June 6, 2012

Never mind - got it working by removing htmlCodeFormat around the str