Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
\b([^a,e,i,o,u]{0,}qu|[^a,e,i,o,u]+)([a,e,i,o,u][a-z]+)?
/
gi

Description

matches all the consonants (including qu as a consonant, since for these purposes it is) up to the first vowel and splits it on that

Submitted by Todd Nestor - 8 years ago