<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Regex Love</title>
	<atom:link href="http://www.seangates.com/2007/03/19/33/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.seangates.com/2007/03/19/33/</link>
	<description>By the looks of it {he thinks} he knows what he's doing.</description>
	<lastBuildDate>Tue, 03 Aug 2010 12:44:47 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Mitch</title>
		<link>http://www.seangates.com/2007/03/19/33/comment-page-1/#comment-27</link>
		<dc:creator>Mitch</dc:creator>
		<pubDate>Mon, 19 Mar 2007 21:01:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.seangates.com/?p=33#comment-27</guid>
		<description>Regular expressions are cool (fun?)! I use them quite often. A bit of a learning curve, but once you get the hang of it not too difficult. Using sed and regex you can do some absolutely amazing things!

BTW. You need the &#039;?&#039; quantifier after the &#039;-&#039; in your 2nd example to make &#039;-&#039; optional... or after &#039;(&#039; and &#039;)&#039; to make both the &#039;-&#039; and the trailing six digits optional. Like this:

/\d{6}-?\d{6}/ # matches &#039;123456654321&#039; or &#039;123456-654321
/\d{6}(-\d{6})?/ # matches &#039;123456&#039; or &#039;123456-654321&#039;</description>
		<content:encoded><![CDATA[<p>Regular expressions are cool (fun?)! I use them quite often. A bit of a learning curve, but once you get the hang of it not too difficult. Using sed and regex you can do some absolutely amazing things!</p>
<p>BTW. You need the &#8216;?&#8217; quantifier after the &#8216;-&#8217; in your 2nd example to make &#8216;-&#8217; optional&#8230; or after &#8216;(&#8216; and &#8216;)&#8217; to make both the &#8216;-&#8217; and the trailing six digits optional. Like this:</p>
<p>/\d{6}-?\d{6}/ # matches &#8217;123456654321&#8242; or &#8217;123456-654321<br />
/\d{6}(-\d{6})?/ # matches &#8217;123456&#8242; or &#8217;123456-654321&#8242;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
