Regular Expressions 101

Community Patterns

Match Between HTML Tags

1

Regular Expression
PCRE2 (PHP >=7.3)

/
(?<=<span>)(.|\n)*?(?=<\/span>)
/
gm

Description

Match everything within the given HTML tag

Submitted by William Wilkins - 3 years ago