<?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; negative</title>
	<atom:link href="http://iamseanmurphy.com/tag/negative/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>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>
