I have a multiline TextBox for which any of the following inputs are valid:
- Empty string (the text can optionally be blank upon submit).
- A single numeric (0 – 9) string, up to 9 digits long.
- Multiple numeric strings, each up to 9 digits long, each separated by carriage return (\r) and/or newline (\n).
What regular expression will enable me to validate these criteria, using a RegularExpressionValidator control? I’m currently experimenting with the excellent Expresso tool, but would appreciate insight in evaluating these multiple criteria efficiently at once.
1 Answer