Regular Expressions 101

Community Patterns

Get text within pipe placeholders

1

Regular Expression
PCRE (PHP <7.3)

Description

Will return all matches of text between pipe placeholders, e.g. "This text has |two| placeholders |inside| of it" will return matches for two and inside.

Submitted by Eddie Y - 9 years ago