Im a bit embarrased asking this, so i’ll just come straight out with it. I really really don’t understand the technical help so maybe someone can dumb it down.
Im trying to create a validation string to allow EITHER one OR two digits (no more, no less).
These are my efforts, they all only work for the first part (first set of brackets)
Im using Visual Studio validation controls btw.
([0-9])|([0-9][0-9])
(\d{1})|(\d{2})
I would really appreciate a good laymans explanation. Many Thanks 🙂
Thanks to Cfreak for the solution. I would really appreciate a link or a good simple explanation of building strings. Most of what Ive read seems to expect a certain level of knowlege 🙂
Well I’m not very familiar with .NET but any of these of these should work:
or
I’d go with this as it’s the most compact 🙂
or
or
put ( ) around any of them to capture the matched digits.