Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Created·2022-11-03 02:42
Updated·2022-11-03 04:02
Flavor·JavaScript

/
^\p{Lu}\p{L}*\s((\p{Lu}\p{L}*)+\s)*\p{Lu}\p{L}*$
/
gu
Open regex in editor

Description

  • Full name is at least 2 words
  • The words of full name are have uppercase character at the beginning and lowercase characters for the rest.
  • Between two words is just a space character.
  • Full name does not have space character at the beginning and the end of the string.
Submitted by anonymous