<?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>Hank Beaver &#187; regex</title>
	<atom:link href="http://www.hankbeaver.com/index.php/tag/regex/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hankbeaver.com</link>
	<description>Ruby, open-source, Internet technologist located in Atlanta, GA, USA</description>
	<lastBuildDate>Tue, 29 Jun 2010 05:34:15 +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>Reminder to self and world: Varnish uses POSIX regex.</title>
		<link>http://www.hankbeaver.com/index.php/2009/07/14/reminder-to-self-and-world-varnish-uses-posix-regex/</link>
		<comments>http://www.hankbeaver.com/index.php/2009/07/14/reminder-to-self-and-world-varnish-uses-posix-regex/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 19:26:45 +0000</pubDate>
		<dc:creator>hbeaver</dc:creator>
				<category><![CDATA[regex]]></category>
		<category><![CDATA[varnish]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[posix]]></category>

		<guid isPermaLink="false">http://www.rubyslacker.com/?p=91</guid>
		<description><![CDATA[What does this mean? Well for starters, those nice little PCRE shorthands for character classes just don&#8217;t work! So putting this in your Varnish VCL will silently do nothing:

if (req.url ~ "/\d+(/$&#124;/\?&#124;\?&#124;$)") ...

whereas this match: 

if (req.url ~ "/[0-9]+(/$&#124;/\?&#124;\?&#124;$)") ...

Enjoy.
]]></description>
			<content:encoded><![CDATA[<p>What does this mean? Well for starters, those nice little PCRE shorthands for character classes just don&#8217;t work! So putting this in your Varnish VCL will silently do nothing:</p>
<pre>
if (req.url ~ "/\d+(/$|/\?|\?|$)") ...
</pre>
<p>whereas this match: </p>
<pre>
if (req.url ~ "/[0-9]+(/$|/\?|\?|$)") ...
</pre>
<p>Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hankbeaver.com/index.php/2009/07/14/reminder-to-self-and-world-varnish-uses-posix-regex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Realtime response time reporting from Rails logs using regex.</title>
		<link>http://www.hankbeaver.com/index.php/2009/06/05/realtime-response-time-reporting-from-rails-logs-using-regex/</link>
		<comments>http://www.hankbeaver.com/index.php/2009/06/05/realtime-response-time-reporting-from-rails-logs-using-regex/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 15:12:20 +0000</pubDate>
		<dc:creator>hbeaver</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[logs]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[regex]]></category>

		<guid isPermaLink="false">http://www.rubyslacker.com/?p=86</guid>
		<description><![CDATA[Simple but effective regex to monitor when there are issues. In my example below, this will show all response times &#62; 1 second:
 tail -f production.log &#124; egrep "Completed in [0-9]{3,10}"
]]></description>
			<content:encoded><![CDATA[<p>Simple but effective regex to monitor when there are issues. In my example below, this will show all response times &gt; 1 second:</p>
<pre> tail -f production.log | egrep "Completed in [0-9]{3,10}"</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.hankbeaver.com/index.php/2009/06/05/realtime-response-time-reporting-from-rails-logs-using-regex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Regex to find any divs OR spans</title>
		<link>http://www.hankbeaver.com/index.php/2009/03/01/regex-to-find-any-divs-or-spans/</link>
		<comments>http://www.hankbeaver.com/index.php/2009/03/01/regex-to-find-any-divs-or-spans/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 21:09:58 +0000</pubDate>
		<dc:creator>hbeaver</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[div]]></category>
		<category><![CDATA[regex]]></category>
		<category><![CDATA[remove]]></category>
		<category><![CDATA[span]]></category>

		<guid isPermaLink="false">http://www.rubyslacker.com/?p=78</guid>
		<description><![CDATA[I whipped this up to remove all spans and/or divs in an HTML. Don&#8217;t ask why. Here&#8217;s the regex:
&#60; ?(span&#124;div)[a-zA-Z0-9'" =]+&#62;
Did I mention I love regex?
Enjoy.
]]></description>
			<content:encoded><![CDATA[<p>I whipped this up to remove all spans and/or divs in an HTML. Don&#8217;t ask why. Here&#8217;s the regex:</p>
<p>&lt; ?(span|div)[a-zA-Z0-9'" =]+&gt;</p>
<p>Did I mention I love regex?</p>
<p>Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hankbeaver.com/index.php/2009/03/01/regex-to-find-any-divs-or-spans/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t for the &#8216;g&#8217; when doing regex replace in Javascript!</title>
		<link>http://www.hankbeaver.com/index.php/2009/01/12/dont-for-the-g-when-doing-regex-replace-in-javascript/</link>
		<comments>http://www.hankbeaver.com/index.php/2009/01/12/dont-for-the-g-when-doing-regex-replace-in-javascript/#comments</comments>
		<pubDate>Mon, 12 Jan 2009 18:59:53 +0000</pubDate>
		<dc:creator>hbeaver</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[find replace]]></category>
		<category><![CDATA[globally]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[regex]]></category>

		<guid isPermaLink="false">http://www.rubyslacker.com/?p=75</guid>
		<description><![CDATA[When needing to perform a String.replace() with some regex and globally replace text. You must remember to put the &#8220;g&#8221; argument like so:
var str = &#8220;&#8216;http://www.com/123/123&#8242;&#8221;
str.replace(/&#8217;/g,&#8221;")
Spent a few minutes banging my head on this one.  So remember the &#8220;g&#8221;!
]]></description>
			<content:encoded><![CDATA[<p>When needing to perform a String.replace() with some regex and globally replace text. You must remember to put the &#8220;g&#8221; argument like so:</p>
<p>var str = &#8220;&#8216;http://www.com/123/123&#8242;&#8221;</p>
<p>str.replace(/&#8217;/g,&#8221;")</p>
<p>Spent a few minutes banging my head on this one.  So remember the &#8220;g&#8221;!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hankbeaver.com/index.php/2009/01/12/dont-for-the-g-when-doing-regex-replace-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
