<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Rob Raux: Running, Programming, Parenting, Living... &#187; emacs</title>
	<atom:link href="http://www.dragonslife.org/programming/technology/programming/emacs/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dragonslife.org</link>
	<description></description>
	<lastBuildDate>Sun, 04 Apr 2010 13:20:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>xemacs &#8211; how to use replace-regexp</title>
		<link>http://www.dragonslife.org/xemacs-how-to-use-replace-regexp/programming/emacs/</link>
		<comments>http://www.dragonslife.org/xemacs-how-to-use-replace-regexp/programming/emacs/#comments</comments>
		<pubDate>Tue, 09 Sep 2008 20:45:32 +0000</pubDate>
		<dc:creator>Rob</dc:creator>
				<category><![CDATA[emacs]]></category>

		<guid isPermaLink="false">http://www.dragonslife.org/?p=86</guid>
		<description><![CDATA[The documentation available is terse on how to use the replace-regexp function.  Lately I have needed to do a rather large number of complex replacement&#8217;s across code.  Here are some things that I should definitely remember next time:


M-x replace-regexp RET \(.*\)-safe RET \1 RET

Parenthesis used for matching values for replace always need to be escaped [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.xemacs.org/Documentation/21.5/html/xemacs_15.html#SEC125">documentation</a> available is terse on how to use the replace-regexp function.  Lately I have needed to do a rather large number of complex replacement&#8217;s across code.  Here are some things that I should definitely remember next time:</p>
<ol>
<li>
<pre>M-x replace-regexp <kbd>RET</kbd> \(.*\)-safe <kbd>RET</kbd> \1 <kbd>RET</kbd></pre>
<ul>
<li>Parenthesis used for matching values for replace always need to be escaped in emacs.  There are no exceptions and you will go insane if you do not remember this.</li>
</ul>
</li>
<li> <samp>&#8216;</samp><samp>\&amp;</samp>&#8216; in <var>newstring</var> stands for the entire text being replaced. You don&#8217;t need to match the entire string to add to it.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.dragonslife.org/xemacs-how-to-use-replace-regexp/programming/emacs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
