Example Regular Expressions
The following are regular expression examples which will match:
^.*$
^$
\s+
(?n\s+)
- Whitespace that spans at least two lines. Note minimal matching `*?' quantifier.
(?n\s*?\n\s*)
(?:\d{1,3}(?:\.\d{1,3}){3})
- Two character US Postal state abbreviations (includes territories).
[ACDF-IK-PR-W][A-Z]
(?:http://)?www\.\S+
- Case insensitive double words across line breaks.
(?i(?n<(\S+)\s+\1>))
- Upper case words with possible punctuation.
<[A-Z][^a-z\s]*>