<?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: Clojure&#8217;s new regex syntax</title>
	<atom:link href="http://items.sjbach.com/406/clojures-new-regex-syntax/feed" rel="self" type="application/rss+xml" />
	<link>http://items.sjbach.com/406/clojures-new-regex-syntax</link>
	<description></description>
	<lastBuildDate>Fri, 19 Feb 2010 12:11:08 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Clojure Roundup: Post-Thanksgiving vacation edition &#171; Clojure Study Group DC</title>
		<link>http://items.sjbach.com/406/clojures-new-regex-syntax/comment-page-1#comment-976</link>
		<dc:creator>Clojure Roundup: Post-Thanksgiving vacation edition &#171; Clojure Study Group DC</dc:creator>
		<pubDate>Mon, 01 Dec 2008 14:05:28 +0000</pubDate>
		<guid isPermaLink="false">http://items.sjbach.com/?p=406#comment-976</guid>
		<description>[...] Clojure recently incorporated a new regex syntax. [...]</description>
		<content:encoded><![CDATA[<p>[...] Clojure recently incorporated a new regex syntax. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: greg</title>
		<link>http://items.sjbach.com/406/clojures-new-regex-syntax/comment-page-1#comment-73</link>
		<dc:creator>greg</dc:creator>
		<pubDate>Thu, 20 Nov 2008 00:06:37 +0000</pubDate>
		<guid isPermaLink="false">http://items.sjbach.com/?p=406#comment-73</guid>
		<description>(unicode categories are also useable, i.e &lt;code&gt;\p{P}&lt;/code&gt; for all unicode punctuation signs or &lt;code&gt;\p{Lu}&lt;/code&gt; for all uppercase letters and so on)</description>
		<content:encoded><![CDATA[<p>(unicode categories are also useable, i.e <code>\p{P}</code> for all unicode punctuation signs or <code>\p{Lu}</code> for all uppercase letters and so on)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: greg</title>
		<link>http://items.sjbach.com/406/clojures-new-regex-syntax/comment-page-1#comment-72</link>
		<dc:creator>greg</dc:creator>
		<pubDate>Thu, 20 Nov 2008 00:01:39 +0000</pubDate>
		<guid isPermaLink="false">http://items.sjbach.com/?p=406#comment-72</guid>
		<description>In the Java RE engine, you also have other predefined classes, such as &lt;code&gt;\p{Alpha}&lt;/code&gt; or &lt;code&gt;\p{ASCII}&lt;/code&gt; and so on - see:
http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html

These imo provide readability (although I hate the &lt;code&gt;\p&lt;/code&gt; prefix, &lt;code&gt;{Alone}&lt;/code&gt; would be nice and leave out confusion of the syntax proposed here with square brackets which look too much like &quot;custom&quot; classes) and Unicode support (&lt;code&gt;\p{InArbitraryUnicodeBlock}&lt;/code&gt; for instance)</description>
		<content:encoded><![CDATA[<p>In the Java RE engine, you also have other predefined classes, such as <code>\p{Alpha}</code> or <code>\p{ASCII}</code> and so on &#8211; see:<br />
<a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html" rel="nofollow">http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html</a></p>
<p>These imo provide readability (although I hate the <code>\p</code> prefix, <code>{Alone}</code> would be nice and leave out confusion of the syntax proposed here with square brackets which look too much like &#8220;custom&#8221; classes) and Unicode support (<code>\p{InArbitraryUnicodeBlock}</code> for instance)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen Bach</title>
		<link>http://items.sjbach.com/406/clojures-new-regex-syntax/comment-page-1#comment-70</link>
		<dc:creator>Stephen Bach</dc:creator>
		<pubDate>Wed, 19 Nov 2008 18:47:10 +0000</pubDate>
		<guid isPermaLink="false">http://items.sjbach.com/?p=406#comment-70</guid>
		<description>Chaitanya, I am suitably corrected.  I&#039;ve updated the article -- Edi certainly deserves his due.  Thanks.

doug, thanks!

Johan: fixed it up for you. :-)  And I agree, Perl is the big winner here.</description>
		<content:encoded><![CDATA[<p>Chaitanya, I am suitably corrected.  I&#8217;ve updated the article &#8212; Edi certainly deserves his due.  Thanks.</p>
<p>doug, thanks!</p>
<p>Johan: fixed it up for you. <img src='http://items.sjbach.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />   And I agree, Perl is the big winner here.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Johan L</title>
		<link>http://items.sjbach.com/406/clojures-new-regex-syntax/comment-page-1#comment-69</link>
		<dc:creator>Johan L</dc:creator>
		<pubDate>Wed, 19 Nov 2008 18:32:18 +0000</pubDate>
		<guid isPermaLink="false">http://items.sjbach.com/?p=406#comment-69</guid>
		<description>Great, the lack of indentation made the last example look like crap. Oh, well...</description>
		<content:encoded><![CDATA[<p>Great, the lack of indentation made the last example look like crap. Oh, well&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Johan L</title>
		<link>http://items.sjbach.com/406/clojures-new-regex-syntax/comment-page-1#comment-68</link>
		<dc:creator>Johan L</dc:creator>
		<pubDate>Wed, 19 Nov 2008 18:30:56 +0000</pubDate>
		<guid isPermaLink="false">http://items.sjbach.com/?p=406#comment-68</guid>
		<description>The most readable Perl regexes are written with the &lt;code&gt;/x&lt;/code&gt; modifier so you can have whitespace in it. That also makes it possible to write the regex on multiple lines with proper indentation and use &lt;code&gt;#&lt;/code&gt; comments.

(the data doesn&#039;t quite seem to match the regexes).

&lt;pre&gt;
m&#124; &lt;img \s+ src=&quot;\w+  /  \d+  /  (\w+) &#124;x
&lt;/pre&gt;

or even:

&lt;pre&gt;
m&#124; 
    &lt;img \s+ 
        src=&quot;\w+  # Initial word (something)
        / \d+     # Bogus number
        / (\w+)   # Capture basename
&#124;x
&lt;/pre&gt;

Yeah, Perl is just so much line noise...</description>
		<content:encoded><![CDATA[<p>The most readable Perl regexes are written with the <code>/x</code> modifier so you can have whitespace in it. That also makes it possible to write the regex on multiple lines with proper indentation and use <code>#</code> comments.</p>
<p>(the data doesn&#8217;t quite seem to match the regexes).</p>
<pre>
m| &lt;img \s+ src="\w+  /  \d+  /  (\w+) |x
</pre>
<p>or even:</p>
<pre>
m|
    &lt;img \s+
        src="\w+  # Initial word (something)
        / \d+     # Bogus number
        / (\w+)   # Capture basename
|x
</pre>
<p>Yeah, Perl is just so much line noise&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: doug</title>
		<link>http://items.sjbach.com/406/clojures-new-regex-syntax/comment-page-1#comment-67</link>
		<dc:creator>doug</dc:creator>
		<pubDate>Wed, 19 Nov 2008 18:25:54 +0000</pubDate>
		<guid isPermaLink="false">http://items.sjbach.com/?p=406#comment-67</guid>
		<description>For the record, Python is pretty clear too:  &lt;code&gt;r&#039;&lt;img\s+src=&quot;\w+/\d+/(\w+)&#039;&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>For the record, Python is pretty clear too:  <code>r'&lt;img\s+src="\w+/\d+/(\w+)'</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chaitanya Gupta</title>
		<link>http://items.sjbach.com/406/clojures-new-regex-syntax/comment-page-1#comment-66</link>
		<dc:creator>Chaitanya Gupta</dc:creator>
		<pubDate>Wed, 19 Nov 2008 17:29:34 +0000</pubDate>
		<guid isPermaLink="false">http://items.sjbach.com/?p=406#comment-66</guid>
		<description>Wanted to make the same point as Peter -- Edi&#039;s cl-interpol+cl-ppcre is a great combination if you deal with regexes in CL a lot.</description>
		<content:encoded><![CDATA[<p>Wanted to make the same point as Peter &#8212; Edi&#8217;s cl-interpol+cl-ppcre is a great combination if you deal with regexes in CL a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen Bach</title>
		<link>http://items.sjbach.com/406/clojures-new-regex-syntax/comment-page-1#comment-65</link>
		<dc:creator>Stephen Bach</dc:creator>
		<pubDate>Wed, 19 Nov 2008 17:02:52 +0000</pubDate>
		<guid isPermaLink="false">http://items.sjbach.com/?p=406#comment-65</guid>
		<description>Peter, thanks!  I was aware of CL-INTERPOL, but I&#039;ve never used it and didn&#039;t know of its &quot;synergy&quot; with CL-PPCRE.

Matt, looks nifty, and I agree, more Lisp-like.</description>
		<content:encoded><![CDATA[<p>Peter, thanks!  I was aware of CL-INTERPOL, but I&#8217;ve never used it and didn&#8217;t know of its &#8220;synergy&#8221; with CL-PPCRE.</p>
<p>Matt, looks nifty, and I agree, more Lisp-like.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Might</title>
		<link>http://items.sjbach.com/406/clojures-new-regex-syntax/comment-page-1#comment-64</link>
		<dc:creator>Matt Might</dc:creator>
		<pubDate>Wed, 19 Nov 2008 16:21:23 +0000</pubDate>
		<guid isPermaLink="false">http://items.sjbach.com/?p=406#comment-64</guid>
		<description>Certainly a big improvement, but I&#039;ve always preferred Scheme Shell&#039;s S-Expression-based regex syntax for flavors of Lisp.</description>
		<content:encoded><![CDATA[<p>Certainly a big improvement, but I&#8217;ve always preferred Scheme Shell&#8217;s S-Expression-based regex syntax for flavors of Lisp.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
