Regular Expressions 101

Words with spaces in-between

Open Workspace
  • Python
  • Match
0

Regular Expression

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