Regular Expressions 101

Community Patterns

Match the first and last char of a word

-2

Regular Expression
PCRE (PHP <7.3)

/
((?<=^|\s)[a-z])|([a-z](?:$|\s))
/
g

Description

no description available

Submitted by pedroppinheiro - 9 years ago