Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Coldfusion RegEx replace html characters like  

I currently have code to remove html from a string:

<cfset arguments.textToFormat = REReplaceNoCase(arguments.textToFormat,"<[^>]*>","","ALL") />

However, this does not remove html characters like &nbsp;

What Regex could I use to ReReplace these characters??

Thanks

like image 251
Paolo Broccardo Avatar asked Nov 24 '25 12:11

Paolo Broccardo


1 Answers

For removing &nbsp; and other similar strings :

&[^;]+?;

HTH

like image 52
Stephan Avatar answered Nov 28 '25 17:11

Stephan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!