Home » Web Development » 05 - Client Side Scripting Concepts
5
Escape
Rules associated with regular expressions in javascript
/ - Any letter preceded by the slash is interpreted as a code rather than matched literally. On the other hand, special characters that are preceded by the slash are matched literally. \*, for example, matches an asterisk (not 0 or more of the preceding character) while \d matches digits 0 to 9 rather than the letter 'd'.
There are extensive sets of rules associated with regular expressions in Javascript. Please click for a comprehensive picture and examples. For our purposes, let us simply familiarize ourselves with the expressions we will use for our validation of text input fields.