Ned the dolphin


Example Regular Expressions

The following are regular expression examples which will match:

  • An entire line.
        ^.*$

  • Blank lines.
        ^$

  • Whitespace on a line.
        \s+

  • Whitespace across lines.
        (?n\s+)

  • Whitespace that spans at least two lines. Note minimal matching `*?' quantifier.
        (?n\s*?\n\s*)

  • IP address (not robust).
        (?:\d{1,3}(?:\.\d{1,3}){3})

  • Two character US Postal state abbreviations (includes territories).
        [ACDF-IK-PR-W][A-Z]

  • Web addresses.
        (?: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]*>


Search nedit.org
Search by Google

Error: RSS file not found...
Niki - Recent changes [en]
Niki

Error: RSS file not found...
Sponsors

hosting and design by
Loco


unless otherwise stated all material is © 1999-2004 NEdit.org