Regular Expressions 101

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 - 9 years ago