Regular Expressions 101

Community Patterns

Name with spaces also useful for city name

1

Regular Expression
ECMAScript (JavaScript)

/
^[a-zA-Z\s]+$
/

Description

It will accepts the name with spaces with no limitation and we can also use same for city.

Submitted by Pravallika Chowdary - 8 years ago