-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
  • 125
  • 11

1 Answers1

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