 Regular Expressions A regular expression, or regexp for short, is a pattern that denotes a (possibly infinite) set of strings. Searching for matches for a regexp is a very powerful operation. This section explains how to write regexps; the following section says how to search for them.  For interactive development of regular expressions, you can use the M-x re-builder command. It provides a convenient interface for creating regular expressions, by giving immediate visual feedback in a separate buffer. As you edit the regexp, all its matches in the target buffer are highlighted. Each parenthesized sub-expression of the regexp is shown in a distinct face, which makes it easier to verify even very complex regexps.  Note that by default Emacs search ignores case (see Searching and Case). To enable case-sensitive regexp search and match, bind case-fold-search to nil around the code you want to be case-sensitive.   
• Syntax of Regexps

 
Rules for writing regular expressions. 
 
• Regexp Example

 
Illustrates regular expression syntax. 
 
• Rx Notation

 
An alternative, structured regexp notation. 
 
• Regexp Functions

 
Functions for operating on regular expressions. 
 
• Regexp Problems

 
Some problems and how they may be avoided. 
 

    Copyright 
{'path': 'public/docs/elisp/regular-expressions.html', 'source': 'DevDocs.IO'}