Name Validation Regular Expression

Category: Strings

A regular expression that matches and validates people’s names (first name, middle name, last name).

/(^[a-zA-Z][a-zA-Z\s]{0,20}[a-zA-Z]$)/

Username Examples:

  • James
  • Kevin Wayne Durant
  • Dirk Nowitzki

See Also:

Rate This Regex
Sending
User Review
0 (0 votes)

Expression Flags

Flags Description
i Ignore case sensitive.
g Allows global search.
m Allows multiline search.