Hi, if you are using regular expressions, I recommend you the following tools and sites:
Regex tools to learn, build, test regular expressions:
http://regex.lumadis.be/test_regex.php?lang=fr
Tutorials about regexp:
http://en.wikipedia.org/wiki/Regular_expression
http://www.regular-expressions.info/quickstart.html
Examples:
.at
matches any three-character string ending with “at”, including “hat”, “cat”, and “bat”.[hc]at
matches “hat” and “cat”.[^b]at
matches all strings matched by.at
except “bat”.[^hc]at
matches all strings matched by.at
other than “hat” and “cat”.^[hc]at
matches “hat” and “cat”, but only at the beginning of the string or line.[hc]at$
matches “hat” and “cat”, but only at the end of the string or line.\[.\]
matches any single character surrounded by “[” and “]” since the brackets are escaped, for example: “[a]” and “[b]”.s.*
matches any number of characters preceded by s, for example: “saw” and “seed”.