Regex for No whitespace

Matches a string containing no whitespace characters.

^\S+$

Proof it works

4/4 sample tests passed · compiles: true

SampleShould matchResult
hello yes pass
a-b_c yes pass
hello world no pass
no pass

Try your own input

Related patterns