Previous: , Up: Searching and Matching   [Contents][Index]

35.9 Emacs versus POSIX Regular Expressions

Regular expression syntax varies significantly among computer programs. When writing Elisp code that generates regular expressions for use by other programs, it is helpful to know how syntax variants differ. To give a feel for the variation, this section discusses how Emacs regular expressions differ from two syntax variants standarded by POSIX: basic regular expressions (BREs) and extended regular expressions (EREs). Plain grep uses BREs, and ‘grep -E’ uses EREs.

Emacs regular expressions have a syntax closer to EREs than to BREs, with some extensions. Here is a summary of how POSIX BREs and EREs differ from Emacs regular expressions.

Previous: Standard Regular Expressions Used in Editing, Up: Searching and Matching   [Contents][Index]