Retrieves all anchor links in a html document, useful for spidering. You will need to do a replace of &quot; and ' after the regular expression, as the expression gets all links. As far as I know there is no way, even with \1 groupings, of getting a condition on whether the link contains a &quot;,' or nothing at all (&quot; and ' is easy enough, but what happens if the link starts with &quot;, and has a javascript function call with a string in it). If there is, it's probably quicker to do it like this and do a string replace anyway.

Matches email addresses. Based on expression at regular-expressions.info/email.html modified to include all top-level domains (TLD)listed on wikipedia as of June 2010. Needs to be updated as new TLDs are added.
Known Issues:
* IP Addresses will not validate
* Double "at" symbols, e.g. email@em@il.com slip by this regex. Would welcome improvements by a regex ninja.

Somewhat conservative expression for evaluating phone numbers. Based off ideas found at http://stackoverflow.com/questions/123559/a-comprehensive-regex-for-phone-number-validation this allows country codes, with or without the + symbol, area codes surrounded by parenthesis (or not) and numbers delimited by spaces, periods or dashes. You'll want to independently test for string length based on your needs.

Matches both normalized and E notations, with or without spaces or negative numbers. Make sure to use a case insensitive pattern matcher. Group 1 is the significand, and either group 5 or group 7 is the exponent (one or the other will be null, but never both).

Word HTML cleanup code. Use this expression to get rid of most of the stuff that Word adds to an HTML document such as: lots of span elements, font-family and font-size style attributes, class attributes, a whole bunch of if-then statements. Use this expression in a regex.replace(originalHtml, regExpr, &quot;&quot;).

User can specify n numbers of digits, upper case character and special character.
In this example, we will use two special characters, digits and upper case in the password.
Explanation:
(?=^.{12,25}$) -- password length range from 12 to 25
(?=(?:.*?[!@#$%*()_+^&}{:;?.]){2}) -- at least 2 special characters (!@#$%*()_+^&}{:;?.})
(?=(?:.*?\d){2}) -- at least 2 digits
(?=.*[a-z]) -- characters a-z
(?=.{2,}[A-Z]) -- at least 2 upper case characters