I'm searching for a Regex to avoid letting user to enter a string with only a single ? character. Here are examples of what I want to achieve: ? Not Ok (I want to avoid letting this) ?a Ok a? Ok ?? Ok ??? Ok
Asked
Active
Viewed 93 times
1 Answers
0
This matches either any one- character string which is different from ?
or any string with at least two characters
^([^?]|..+)$

derpirscher
- 14,418
- 3
- 18
- 35