Regex for string of exactly 5 characters
Matches any string that is exactly 5 character(s) long.
^.{5}$
Proof it works
| Sample | Should match | Result |
|---|---|---|
chmrw |
yes | pass |
chmrwb |
no | pass |
chmr |
no | pass |
Matches any string that is exactly 5 character(s) long.
^.{5}$
| Sample | Should match | Result |
|---|---|---|
chmrw |
yes | pass |
chmrwb |
no | pass |
chmr |
no | pass |