Name: Jeff Pinyan
Member since: 2000-11-02 18:09:52
Last Login: N/A
Homepage: http://www.pobox.com/~japhy/
Notes: Perl fanatic, regex maniac, teen wonderboy (maybe that's going over the edge). You probably know me from IRC or PerlMonks.org or PerlArchive.com or comp.lang.perl.misc (if you're a Perl folk). And I have a life on the side! Recent project: regular expression reversal -- hopefully going to be a presentation and paper at TPC 5.
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.
The simplest example is matching the last sequence of digits in a string. With a regex like (\d+)\D*$, the engine will find EACH occurrence of \d+, 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 ^\D*(\d+). Then, reverse the sequence that matches.
I've developed a module for reversing many simple regular expressions, in Perl. What would be nice is an optimizer, since in ^\D*(\d+), the ^ and \D* are totally extraneous.
Anyway, it's cool, fun, efficient, and writing the parser helped me understand how less sleep makes regular expressions make more sense. ;)
japhy certified others as follows:
Others have certified japhy as follows:
[ Certification disabled because you're not logged in. ]
FOAF updates: Trust rankings are now exported, making the data available to other users and websites. An external FOAF URI has been added, allowing users to link to an additional FOAF file.
Keep up with the latest Advogato features by reading the Advogato status blog.
If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!