Regular Expressions 101

Community Patterns

Community Library Entry

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 - 10 years ago