Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
^[A-Z\u00C0-\u00D6\u00D8-\u00DD][a-z\u00E0-\u00F6\u00F8-\u00FF]*(?:-[A-Z\u00C0-\u00D6\u00D8-\u00DD][a-z\u00E0-\u00F6\u00F8-\u00FF]*)?$
/
gm

Description

captures the simple names and composed names whose first letter is Upper letter, and following letters are lower letters, for each composed name, Accepts accents in both upper and lower letters. for ex: Jean-Luc, Jean, Pierre, Pierre-Louis, Özil-Ricô...

Submitted by anonymous - 3 years ago