Regular Expressions 101

Community Patterns

Get the text from html

0

Regular Expression
PCRE (PHP <7.3)

/
(?<=>)((?!\s*<)[\s\S]+?)(?=<)
/
gm

Description

Get the clean text inside and between html tags without empty strings

Submitted by Velisariy - 5 years ago