<?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>info.michael-simons.eu &#187; XHTML</title>
	<atom:link href="http://info.michael-simons.eu/tag/xhtml/feed/" rel="self" type="application/rss+xml" />
	<link>http://info.michael-simons.eu</link>
	<description>Just another nerd blog</description>
	<lastBuildDate>Wed, 08 Feb 2012 10:26:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Ampersands and XHTML</title>
		<link>http://info.michael-simons.eu/2008/05/25/ampersands-and-xhtml/</link>
		<comments>http://info.michael-simons.eu/2008/05/25/ampersands-and-xhtml/#comments</comments>
		<pubDate>Sun, 25 May 2008 12:47:42 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[English posts]]></category>
		<category><![CDATA[Shortcuts]]></category>
		<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[regular expressions]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://info.michael-simons.eu/?p=167</guid>
		<description><![CDATA[A regular expression to replace all ampersands (&#038;) in a text that are not part of an entity: t = t.gsub&#40;/&#38;&#40;?!#?\w+;)/, '&#38;amp;') Language is ruby. The regexp feature used is called a negative lookahead. Share This]]></description>
			<content:encoded><![CDATA[<p>A regular expression to replace all ampersands (&#038;) in a text that are not part of an entity:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">t = t.<span style="color:#CC0066; font-weight:bold;">gsub</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">/&amp;</span><span style="color:#006600; font-weight:bold;">&#40;</span>?!<span style="color:#008000; font-style:italic;">#?\w+;)/, '&amp;amp;')</span></pre></div></div>

<p>Language is ruby. The regexp feature used is called a negative lookahead.</p>
<p class="akst_link"><a href="http://info.michael-simons.eu/?p=167&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_167" class="akst_share_link " rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://info.michael-simons.eu/2008/05/25/ampersands-and-xhtml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.383 seconds -->

