This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
Hi,
How do I write a regex pattern for numbers -1, 0, 1, 2, 3 4, 5? I need for any combination of digits 0 to 5 and another solely for negative one.
Appreciate any help.
Marilyn Gambone
Try this pattern:
-1|[0-5]
(Or “^(-1|[0-5])$” to match the whole string).