Skip to main content
2 of 3
made the answer more of an answer
Simon Forsberg
  • 59.4k
  • 9
  • 156
  • 309

How strict do you want the checking to be? The initial algorithm accepts (1),(2, 3) as valid input, as well as 1,2,3)))))) etc.

You might want to consider changing your regex to make it more strict, as there are a lot more than just your example input (1, 2, 3) that gets excepted.

iheggie
  • 181
  • 3