Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
ECMAScript (JavaScript)

/
^[A-Za-z]( ?[A-Za-z] ?)*$
/
g

Description

This will allow only one space after a word.And also do not start with a space.

Submitted by Rama Krishna - 8 years ago (Last modified a year ago)