Regular Expressions 101

Community Patterns

Remove HTML tags

4

Regular Expression
PCRE (PHP <7.3)

/
<\/?[a-z][a-z0-9]*[^<>]*>|<!--.*?-->
/
img

Description

This regex is used to remove HTML tag on string

Submitted by Jordane BACHELET - 9 years ago