php - Regex to match all closing HTML tags -


for reason, need remove closing html tags string in php, need regular expression match closing html tags. i'm extremely unexperienced regular expressions, tried using /\<\\.*\>/g , /<\\.*>/g, didn't work. should use instead?

please note want match closing html tags. opening html tags should remain untouched. in advance!

use regex:

</.+?> 

or

/<\/.+?>/ 

that do.

live demo


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

c# - Unity IoC Lifetime per HttpRequest for UserStore -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -