Website hosting, cheap domain registration and search engine submission services

  Associate Sites:

Search engine submission and ranking

Cheap domain name registration 

 

Regexp Replacement

The M-x replace-string command replaces exact matches for a single string. The similar command M-x replace-regexp replaces any match for a specified pattern.

In replace-regexp, the newstring need not be constant: it can refer to all or part of what is matched by the regexp. \& in newstring stands for the entire match being replaced. \d in newstring, where d is a digit, stands for whatever matched the dth parenthesized grouping in regexp. To include a \ in the text to replace with, you must enter \\. For example,

     M-x replace-regexp <RET> c[ad]+r <RET> \&-safe <RET>
     

replaces (for example) cadr with cadr-safe and cddr with cddr-safe.

     M-x replace-regexp <RET> \(c[ad]+r\)-safe <RET> \1 <RET>
     

performs the inverse transformation.

 

 

 

 

Disclaimers: This documentation is provided for the benefits of Active-Venture.com website hosting customers only.

 
Quotes: When a true genius appears in this world, you may know him by this sign, that the dunces are all in confederacy against him.