Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^([A-Za--ÖØ-öø-ú]+) ((?:(?:[D-d]e|[D-d]a|[D-d]o|[D-d]as|[D-d]os|[E-e]m|[E-e]|[D-d]el|[E-e]l)\s(?:[A-Za--ÖØ-öø-ú]+))|(?:[A-Za--ÖØ-öø-ú]+))
/
gim

Description

An expression to get nouns by grouping prepositions with surnames

Submitted by maurocsjr@gmail.com - 2 years ago