The frequency or position of bracketed character sequences and single characters can be denoted by a special character. The following table lists a set of metacharacters which can be used in PERL Style Regular Expressions.
Sometimes situations arise when a user should fill a single or more than one fields with alphabet characters (A-Z or a-z) in an HTML form.
A regular expression pattern is composed of simple characters, such as .
The last example includes parentheses which are used as a memory device.
This validation descriptor is valid only for drop down lists.
The drop down select list boxes usually will have one item saying ‘Select One’ (and that item will be selected by default).
You can write a Java Script form validation script to check whether the required field(s) in the HTML form contains only letters.
For example, the pattern means 0 or more occurrences of the preceding item) and then immediately followed by 'c'.The Java Script class presented here makes the form validations many times easier.The script has a catalog of almost all the common validation types built-in.file_download Download the validation code from here. This chapter describes Java Script regular expressions.