Hi,
This is the explanation for the regular expression you have written :
1) ^ : Caret matches start of the string
2) [] : Square brackets are used to define the character classes. It will any of the characters that are specified within square brackets.
e.g. In you example it will match either "\w" or "." or "=" or "-"
3) \w : Shorthand for characters (digits and letters)
4)\. : Backslash removes the special meaning of the character. So \. will be taken as dot.
4) + - Repeats previous item once or more.
5)[a-z] : Matches any character from a to z.
6) {m.n} : Curly brackets repeats previous item between m and n amount of times.
7) $ : Dollar is used to match end of the string.
Now ,you can interpret expression "^[\w\.=-]+@[\w\.-]+\.[a-z]{2,4}$" from the above explanation.
Please explain ^[\w\.=-]+@[\w\.-]+\.[a-z]{2,4}$. It is regular expression for checking email address.
Harman