NEdit.org    The Nirvana Editor Web Site
.

NEdit.org Home
Table of Contents

Getting Started

Basic Operation
Selecting Text
Finding/Replacing
Cut and Paste
Using the Mouse
Keyboard Shortcuts
Shifting and Filling
File Format

Features for
Programming

Programming
Tabs/Emul. Tabs
Auto/Smart Indent
Syntax Highlighting
Finding Decl.

Regular Expressions
Basic Syntax
Escape Sequences
Parenthetical Const.
Advanced Topics
Examples

Macro/Shell Extensions
Shell and Filters
Learn/Replay
Macro Language
Macro Subroutines
Action Routines

Customizing
Customizing NEdit
Preferences
X Resources
Key Binding
Highlighting Patterns
Indent Macros

Miscellaneous
NEdit Cmd Line
Client/Server Mode
Crash Recovery
Problems/Defects

.

 

.

Regular Expressions: Examples

  • Entire line.
        ^.*$
  • Blank lines.
        ^$
  • Whitespace on a line.
        \s+
  • Whitespace across lines.
        (?n\s+)
  • Whitespace that spans at least two lines.
        (?n\s*?\n\s*)       Note minimal matching `*?' quantifier
  • IP address (not robust.)
        (?:\d{1,3}(?:\.\d{1,3}){3})
  • Two characters 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]*>

* References

An excellent book on the care and feeding of regular expressions is

"Mastering Regular Expressions"
Jeffrey E. F. Friedl
(c) 1997, O'Reilly & Associates
ISBN 1-56592-257-3

 

<< Previous Section
Regular Exp. Advanced Topics
Table of Contents
Next Section >>
Shell Command and Filters

 

 

. . Released on  Wed, 6 Nov 2002  by C. Denat