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 51 times
1 Answers
0
This matches either any one- character string which is different from ? or any string with at least two characters
^([^?]|..+)$
derpirscher
- 10,570
- 3
- 12
- 30