<?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>Hello, I am Sean Murphy &#187; regex</title>
	<atom:link href="http://iamseanmurphy.com/tag/regex/feed/" rel="self" type="application/rss+xml" />
	<link>http://iamseanmurphy.com</link>
	<description>Thoughts, news, code by Sean Murphy</description>
	<lastBuildDate>Wed, 19 Aug 2009 17:40:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Auto-Linking URLs with PHP</title>
		<link>http://iamseanmurphy.com/2008/12/01/auto-linking-urls-with-php/</link>
		<comments>http://iamseanmurphy.com/2008/12/01/auto-linking-urls-with-php/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 23:54:30 +0000</pubDate>
		<dc:creator>Sean Murphy</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[auto-linking]]></category>
		<category><![CDATA[laconica]]></category>
		<category><![CDATA[links]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[regex]]></category>
		<category><![CDATA[urls]]></category>

		<guid isPermaLink="false">http://iamseanmurphy.com/2008/12/01/auto-linking-urls-with-php/</guid>
		<description><![CDATA[A week or so ago I was working on a bug in the auto-linking code for Laconica, the software that powers Indenti.ca. Squashing that particular bug wasn&#8217;t too hard, but I wanted to take the functionality a step further (closer to the calibre of Gmail) and it turns out, writing robust auto-linking code is more [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>A week or so ago I was working on a bug in the auto-linking code for <a href="http://laconi.ca" onclick="javascript:pageTracker._trackPageview ('/outbound/laconi.ca');">Laconica</a>, the software that powers <a href="http://identi.ca" onclick="javascript:pageTracker._trackPageview ('/outbound/identi.ca');">Indenti.ca</a>. Squashing that particular bug wasn&#8217;t too hard, but I wanted to take the functionality a step further (closer to the calibre of Gmail) and it turns out, writing robust auto-linking code is more difficult than it initially seems. So I played with it a little at a time here and there, testing as many edge cases as I could think of. The result is a function that&#8217;s more robust than most URL auto-linking code I&#8217;ve come across.</p>
<p>I still need to add support of internationalized TLDs and HTML. So, although it only works with plain text for now, I think it&#8217;s off to a good start. Check out the <a href="http://iamseanmurphy.com/autolinking/demo.php">demo</a> or <a href="http://iamseanmurphy.com/autolinking/demo.php?download">download the source</a>.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://iamseanmurphy.com/2008/12/01/auto-linking-urls-with-php/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Negative Word Matching with Regular Expressions</title>
		<link>http://iamseanmurphy.com/2008/04/28/negative-word-matching-with-regular-expressions/</link>
		<comments>http://iamseanmurphy.com/2008/04/28/negative-word-matching-with-regular-expressions/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 22:42:34 +0000</pubDate>
		<dc:creator>Sean Murphy</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[negative]]></category>
		<category><![CDATA[regex]]></category>
		<category><![CDATA[word]]></category>

		<guid isPermaLink="false">http://iamseanmurphy.com/2008/04/28/negative-word-matching-with-regular-expressions/</guid>
		<description><![CDATA[Today on the #codeigniter IRC channel someone asked about how to match a string that didn&#8217;t start with a specific word using a regex. I quickly threw out that, off the top of my head, /^(word){0}/ should work. Well, surprisingly, it didn&#8217;t. Turns out negatively matching words with regular expressions is a little more difficult.
After [...]


Related posts:<ol><li><a href='http://iamseanmurphy.com/2009/03/30/taking-the-pain-out-of-domain-hunting/' rel='bookmark' title='Permanent Link: Taking The Pain Out Of Domain Hunting'>Taking The Pain Out Of Domain Hunting</a></li><li><a href='http://iamseanmurphy.com/2008/12/01/auto-linking-urls-with-php/' rel='bookmark' title='Permanent Link: Auto-Linking URLs with PHP'>Auto-Linking URLs with PHP</a></li></ol>]]></description>
			<content:encoded><![CDATA[<p>Today on the #codeigniter IRC channel someone asked about how to match a string that <em>didn&#8217;t</em> start with a specific <u>word</u> using a regex. I quickly threw out that, off the top of my head, /^(word){0}/ should work. Well, surprisingly, it didn&#8217;t. Turns out negatively matching words with regular expressions is a little more difficult.</p>
<p>After a little research I came up with a working solution: /^(?!word).*/</p>
<p>This post by Jeff Atwood helped: <a href="http://www.codinghorror.com/blog/archives/000425.html" onclick="javascript:pageTracker._trackPageview ('/outbound/www.codinghorror.com');">Excluding matches with Regular Expressions</a></p>


<p>Related posts:<ol><li><a href='http://iamseanmurphy.com/2009/03/30/taking-the-pain-out-of-domain-hunting/' rel='bookmark' title='Permanent Link: Taking The Pain Out Of Domain Hunting'>Taking The Pain Out Of Domain Hunting</a></li><li><a href='http://iamseanmurphy.com/2008/12/01/auto-linking-urls-with-php/' rel='bookmark' title='Permanent Link: Auto-Linking URLs with PHP'>Auto-Linking URLs with PHP</a></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://iamseanmurphy.com/2008/04/28/negative-word-matching-with-regular-expressions/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
