Conclusion

You should now have a good grounding in how and when to use Regular Expressions with you code, although this tutorial only covers their use in Javascript, they are also implemented in Java, Perl and PHP among others and are very similar in each case.

They can provide a very powerful addition to the web developers toolkit for validating form data such as Credit Card Numbers, Order Numbers etc, or for removing any 'odd' characters from a user entered parameter before making it part of a SQL query, or even for updating a path on every page in your website.

There is certainly a lot more detail into which you can with Regular Expressions in Javascript, let alone any other language, but I hope that this tutorial has covered enough to get you started, try the resources listed below for more information.

Resources

I recommend the following resources on Regular Expressions, although I am sure that there are many more (as a quick search on Google proves) :

Books

Javascript: The Definitive Guide O'Reilly
Professional Javascript Wrox
Programming Perl O'Reilly
Mastering Perl Regular Expressions O'Reilly
Amazon Books on Regular Expressions

Websites

Doc Javascript's Introduction to Regular Expressions
Generic Regular Expression Information

Website Designed by Adservio Consulting Valid HTML 4.01 Strict    Valid CSS!    Level A conformance icon, W3C-WAI Web Content Accessibility Guidelines 1.0