I feel just like this regarding my prior struggles with Regular Expressions;

The regex code accepts a phone number between 10-25 chars length.

On the final line we call test method for our regular expression and pass the phone number as input.

To test for an empty string, use the Required Field Validator and Regular Expression Validator controls together.

Form Validation provides the built-in phone validator to validate the phone number in various countries.

Its something so useful, but when you try to read a book on the subject it has the effect of chewing tinfoil.

Thanks The best part for me were the two first sentences...

When I use your Regex Tester with this Regex ^[0-9] \/? Excellent article, but I don't understand the need for both completion and key-press validation. Thanks, Mac It is hard enough for a good writer to make an interesting topic an enjoyable read. Like so many others, I put off learning and using them until forced into it; now I find them so very handy. (It's the closest thing to having a "Do What I Mean" button on my computer that I've ever found!

I hope you will help me with this for you simple question. v=bj IH1jdx2_A[^]Your article gave me a jump-start when I had to learn regular expressions in a hurry. I use that handy utility to check my regular expressions to make sure that "what I mean" is "what I wrote". Thank you in advance, Henrik I always greatly appreciate it when someone takes the time to write something on this subject. [0-9]*$ I can type 100/100, but how can I prevent a number bigger or smaller than 100 before the / ? From my experience, implementing key-press validation alone is sufficient (still would need submission validation to check for blank text boxes). Here i provide a regex pattern to determines if the phone number is in correct format, the pattern force starting with 3 digits follow by a “-” and 7 digits at the end.Explanation \d = only digit allow = length All phone numbers must in “xxx-xxxxxxx” format.Behind the scenes, it uses Javascript regular expressions to check if a given number matches the pattern of phone numbers in particular country.