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