Regular expression for validating special characters the social demography of internet dating
This content is outdated and is no longer being maintained.
You construct a regular expression in one of two ways: Using a regular expression literal, which consists of a pattern enclosed between slashes, as follows: Regular expression literals provide compilation of the regular expression when the script is loaded.
The backslash gives special meaning to the character following it.
For example, the combination "\n" stands for the newline, one of the control characters.
If the regular expression remains constant, using this can improve performance.
Or calling the constructor function of the Using the constructor function provides runtime compilation of the regular expression.
x,y and z (word) – find the “word” specified in the round brackets [abc|xyz] – find either the characters a,b,c or x,y,z We’ll start first with validating a textbox that accepts only numbers.