-3

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

Wadjey
  • 145
  • 13

1 Answers1

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