<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>Advogato blog for japhy</title>
    <link>http://www.advogato.org/person/japhy/</link>
    <description>Advogato blog for japhy</description>
    <language>en-us</language>
    <generator>mod_virgule</generator>
    <pubDate>Sun, 19 May 2013 11:58:07 GMT</pubDate>
    <item>
      <pubDate>Sat, 4 Nov 2000 06:45:22 GMT</pubDate>
      <title>4 Nov 2000</title>
      <link>http://www.advogato.org/person/japhy/diary.html?start=0</link>
      <guid>http://www.advogato.org/person/japhy/diary.html?start=0</guid>
      <description>Whoo hoo.  People know me here.  That's nice. &lt;tt&gt;:)&lt;/tt&gt;.

&lt;p&gt; Rather than post an article, I'm going to diarize my diatribe.  I'm working on a paper for the next Perl conference
in California, TPC 5.0.  It's basically on a whole new regular expression paradigm, that would theoretically work
for any dialect of regexes.  The concept is simple.  Matching variable-width things at the END of a string is not
efficient -- reverse the string and the idea of the regex, and you have a much faster process.

&lt;p&gt; The simplest example is matching the last sequence of digits in a string.  With a regex like &lt;tt&gt;(\d+)\D*$&lt;/tt&gt;,
the engine will find EACH occurrence of &lt;tt&gt;\d+&lt;/tt&gt;, and fail for EACH occurrence but the last one.  This is a
lot of failure for a long string.  So, reverse the input string.  Reverse the sense of the regex to &lt;tt&gt;^\D*(\d+)&lt;/tt&gt;.
Then, reverse the sequence that matches.

&lt;p&gt; I've developed a module for reversing many simple regular expressions, in Perl.  What would be nice is an
optimizer, since in &lt;tt&gt;^\D*(\d+)&lt;/tt&gt;, the &lt;tt&gt;^&lt;/tt&gt; and &lt;tt&gt;\D*&lt;/tt&gt; are totally extraneous.

&lt;p&gt; Anyway, it's cool, fun, efficient, and writing the parser helped me understand how less sleep makes regular
expressions make more sense. &lt;tt&gt;;)&lt;/tt&gt;</description>
    </item>
  </channel>
</rss>
