javascript regular expressions
Introductory Guide to regular expressions Credits: This tutorial is written by Karen Gayda. Modified by JavaScriptKit.com for structure and added additional content/ examples. Please see footnote for more information on author. Introduction Validating user input is the bane of every software developer’s existence. When you are developing cross- browser web applications (IE4+ and NS4+) this task becomes even less enjoyable due to the lack of useful intrinsic validation functions in JavaScript. Fortunately, JavaScript 1.2+ has incorporated regular expressions. In this article I will present a brief tutorial on the basics of regular expressions and then give some examples of how they can be used to simplify data validation. Regular Expressions and Patterns Regular expressions are very powerful tools for performing pattern matches. PERL programmers and UNIX shell programmers have enjoyed the benefits of regular expressions for years. Once you master the pattern langua...