Regex for string of exactly 5 characters

Matches any string that is exactly 5 character(s) long.

^.{5}$

Proof it works

3/3 sample tests passed · compiles: true

SampleShould matchResult
chmrw yes pass
chmrwb no pass
chmr no pass

Try your own input

Related patterns