start page | rating of books | rating of authors | reviews | copyrights

Learning the vi Editor

Learning the vi EditorSearch this book
Previous: 10.6 GUI InterfacesChapter 10
elvis
Next: 10.8 Improved Editing Facilities
 

10.7 Extended Regular Expressions

Extended regular expressions were introduced in Section 8.4, "Extended Regular Expressions" in Chapter 8. The additional metacharacters available in elvis are:

\+

Matches one or more of the preceding regular expressions.

\?

Matches zero or one of the preceding regular expressions.

\@

Matches the word under the cursor.

\=

Indicates where to put the cursor when the text is matched. For instance, hel\=lo would put the cursor on the second l in the next occurrence of hello.

\{...\}

Describes an interval expression, such as x\{1,3\} to match x, xx, or xxx.

POSIX bracket expressions (character classes, etc.) are not available,[2] nor is alternation with the | character or grouping with parentheses.

[2] Well, in elvis 2.0 they're there, they just don't work. This is fixed in elvis 2.1.


Previous: 10.6 GUI InterfacesLearning the vi EditorNext: 10.8 Improved Editing Facilities
10.6 GUI InterfacesBook Index10.8 Improved Editing Facilities

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System