Sams Teach Yourself Emacs in 24 Hours |  | ContentsIndex
Hour 9: Regular Expressions |  | Previous HourNext Hour
Sections in this Hour: |  |

## Q&A

  Q How do I develop a regular expression that is a negation of another? (For example, a regular expression that matches all nonheader lines in HTML?)

  A Unfortunately you can't do that in a simple way. This is a limitation of regular expressions.

  Q I have developed this huge regular expression for Search-and-Replace, but back references from 10 and up don't work ( \10, \11, and so on). Am I doing something wrong?

  A Unfortunately, you are allowed to have back reference only from one to nine (that is, \1, \2, ..., \9).

  Q Is it possible to develop a regular expression that matches printf(...)?

  A Yes, that's easy, as long as you can be sure that there is no ending parenthesis within the argument to printf. If, on the other hand, there can be parentheses in between the parentheses, it is not possible with regular expressions. See Hour 12, "Using Visible Means," for an alternative way to do this.

Sams Teach Yourself Emacs in 24 Hours |  | ContentsIndex
Hour 9: Regular Expressions |  | Previous HourNext Hour
Sections in this Hour: |  |

© Copyright Macmillan USA. All rights reserved.