daryl
daryl

Reputation: 15227

preg_replace html ascii

I'm trying to remove HTML Ascii codes, how do I go about removing something like: '

I tried '/&#[a-zA-Z0-9\s];/' but it didn't work.

Any ideas of how to do this?

Upvotes: 0

Views: 243

Answers (1)

mowwwalker
mowwwalker

Reputation: 17392

It would be '/&#[a-zA-Z0-9]+?;/' if that's what you want to do. I added a plus sign which means one or more of the preceding identifiers.

Upvotes: 2

Related Questions