Regular Expressions 101

Community Patterns

Words with spaces in-between

0

Regular Expression
Python

r"
^[a-zA-Z._'~,-]+(?: +[a-zA-Z._'~,-]+)*$
"
gm

Description

Matches words (with certain special chars) and one or more spaces in between those words.

Submitted by JAVA - 8 years ago