Regular Expressions 101

Community Patterns

Find Word on A Text

1

Regular Expression
PCRE (PHP <7.3)

/
(?<=^|[^a-zA-Z0-9])\Q$text\E(?=$|[^a-zA-Z0-9])
/

Description

This expression find a word in a text without limitation of "\b" statement

Submitted by theShadow - 9 years ago