Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
^word\s.*|.*\sword$|.*\sword\s.*
/

Description

word in sentense - true sentense has a word - true There is a word in the sentense - true Sentense wordless - false Sentense is empty - false words are in the sentense - false Sentense has words - false etc.

Submitted by Denisenko Artem - 9 years ago