[NBLUG/talk] Replacement Syntax in Emacs search/replace string

Eric Eisenhart eric at nblug.org
Tue Dec 12 11:50:14 PST 2006

On Tue, Dec 12, 2006 at 10:55:16AM -0800, Peter Lutz wrote:
> I would like to replace all the <br> with a new line character in Emacs, 
> but I
> can't find out how to specify the new line as the replacement character.  
> I've
> tried \n, \\n, \\\n, ^M, ^Q^M but none of these work.
> Any help please?


I'd just do it with sed: sed -e 's/<br>/\n/'
(add -i option to edit a file in place; or emacs can pipe a region through a
Eric Eisenhart
NBLUG Co-Founder
The North Bay Linux Users Group -- http://nblug.org/
eric at nblug.org, IRC: Freiheit at fn AIM: falschfreiheit

More information about the talk mailing list