<?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>Do Know Evil - A Blog by Tyler Mulligan &#187; Data Manipulation</title>
	<atom:link href="http://www.doknowevil.net/category/computers/software/data-manipulation/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.doknowevil.net</link>
	<description>Tips and Tricks About Computers, Web Development, Linux, the Internet and the Like</description>
	<lastBuildDate>Thu, 29 Jul 2010 03:37:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Notepad++ and the Beauty of Regex</title>
		<link>http://www.doknowevil.net/2007/06/05/notepad-and-the-beauty-of-regex/</link>
		<comments>http://www.doknowevil.net/2007/06/05/notepad-and-the-beauty-of-regex/#comments</comments>
		<pubDate>Wed, 06 Jun 2007 01:43:01 +0000</pubDate>
		<dc:creator>Tyler Mulligan</dc:creator>
				<category><![CDATA[Data Manipulation]]></category>
		<category><![CDATA[Notepad++]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.doknowevil.net/2007/06/05/notepad-and-the-beauty-of-regex/</guid>
		<description><![CDATA[For those of you familiar with regular expressions, you&#8217;re going to love this little feature in Notepad++, Regex find and replace. If you haven&#8217;t used it yet, you&#8217;ve been wasting your time doing things the hard way. Lets say I have a text file with a List of websites in the format as such: URL,]]></description>
			<content:encoded><![CDATA[<p>For those of you familiar with regular expressions, you&#8217;re going to love this little feature in <a href="http://notepad-plus.sf.net" target="_blank">Notepad++</a>, Regex find and replace.  If you haven&#8217;t used it yet, you&#8217;ve been wasting your time doing things the hard way.</p>
<p>Lets say I have a text file with a List of websites in the format as such: <b>URL</b>, <b>Description</b>, <b>Name</b> and I want to turn this list into a bunch of links.</p>
<p><img src='http://www.doknowevil.net/wp-content/uploads/2007/06/regex-1.png' alt='regex-1.png' title='Tyler Mulligan Uses Regex Find and Replace' /></p>
<p>I would look for the following string:</p>

<div class="wp_syntax"><div class="code"><pre class="regex" style="font-family:monospace;color: #ccc; font: 12px Consolas, Lucida Console, Monaco, monospace;">(http://[a-z.]+), ([A-z ']+), ([A-z ]+)</pre></div></div>

<p>By using parenthesis, I&#8217;m defining variables I&#8217;d like to call back in my replace string.  I have created three, the <b>URL</b>(\1), the <b>Descriptiption</b>(\2) and the <b>Name</b>(\3).  Then I call them in my replace string and rearrange them as such:</p>

<div class="wp_syntax"><div class="code"><pre class="regex" style="font-family:monospace;color: #ccc; font: 12px Consolas, Lucida Console, Monaco, monospace;">&lt;a href=&quot;\1&quot;&gt;\3&lt;/a&gt;: \2</pre></div></div>

<p><img src='http://www.doknowevil.net/wp-content/uploads/2007/06/regex-2.png' alt='regex-2.png' title='Tyler Mulligan Uses Regex Find and Replace' /></p>
<p>Now I just click replace, and like magic they are all transformed into pastable links:</p>
<p><img src='http://www.doknowevil.net/wp-content/uploads/2007/06/regex-3.png' alt='regex-3.png' title='Tyler Mulligan Uses Regex Find and Replace' /></p>
<p><a href="http://www.doknowevil.net">Do Know Evil</a>: Tyler Mulligan&#8217;s Blog<br />
<a href="http://www.detrition.net">detrition</a>: Tyler Mulligan&#8217;s Portfolio<br />
<a href="http://www.google.com">Google</a>: Tyler&#8217;s Search Engine of Choice</p>
<p>But the fun doesn&#8217;t stop there, no no no.  Say I had multiple files with the same structure, I would just open said files and click, &#8220;Replace in all open documents&#8221;.</p>
<p><img src='http://www.doknowevil.net/wp-content/uploads/2007/06/regex-4.png' alt='regex-4.png' title='Tyler Mulligan Uses Regex Find and Replace' /></p>
<p>So there you have your crash course in regex find and replace compliments of Notepad++.  It&#8217;s it bit limited in some respects, it doesn&#8217;t fully support regular expressions but it certainly makes a difference.  You can read the details about it&#8217;s abilities <a href="http://notepad-plus.sourceforge.net/uk/regExpList.php" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doknowevil.net/2007/06/05/notepad-and-the-beauty-of-regex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
