Regular Expressions 101

Community Patterns

Allow only one space after a word

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 8 months ago)