Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
(<[^>]+>)+
/
img

Description

Removing HTML tags completely and only keeping text between them. USAGE: I used it to sum words to calculate reading time for articles.

Submitted by @navoneel-talukdar - StackOverflow - 2 years ago