From al at shadowed.net Wed Jun 5 20:53:13 2002 From: al at shadowed.net (Allison Randal) Date: Thu Aug 5 00:07:55 2004 Subject: Apocalypse 5 Message-ID: <20020606015313.GA15153@shadowed.net> It has been slashdotted and perl.com-ed, but just in case you missed it, Apocalypse 5 is out: http://www.perl.com/pub/a/2002/06/04/apo5.html This episode: regular expressions. There's alot of cool stuff in this one. Perl rules! (excuse the bad pun) :) Allison --- To unsubscribe from this list, send an email to majordomo@hfb.pm.org with the following body: unsubscribe nashville-pm-list From pmanci01 at sprintspectrum.com Thu Jun 6 11:53:45 2002 From: pmanci01 at sprintspectrum.com (Mancini, Peter M) Date: Thu Aug 5 00:07:55 2004 Subject: Apocalypse 5 Message-ID: <858C10943BCED511A6C40000D1ECDB10038FFD5E@pkcexv006.sprintspectrum.com> I heard the changes to regexp were pretty fundamental. Has anyone looked at it yet? I am working 16 hours a day right now so I haven't had time to check it out. Anyone got a personal report? --Peter --- To unsubscribe from this list, send an email to majordomo@hfb.pm.org with the following body: unsubscribe nashville-pm-list From al at shadowed.net Thu Jun 6 13:45:16 2002 From: al at shadowed.net (Allison Randal) Date: Thu Aug 5 00:07:55 2004 Subject: Apocalypse 5 In-Reply-To: <858C10943BCED511A6C40000D1ECDB10038FFD5E@pkcexv006.sprintspectrum.com> References: <858C10943BCED511A6C40000D1ECDB10038FFD5E@pkcexv006.sprintspectrum.com> Message-ID: <20020606184516.GB16946@shadowed.net> On Thu, Jun 06, 2002 at 11:53:45AM -0500, Mancini, Peter M wrote: > I heard the changes to regexp were pretty fundamental. Has anyone looked at > it yet? I am working 16 hours a day right now so I haven't had time to > check it out. Anyone got a personal report? They are pretty fundamental changes. If you don't have time to read the Apocalypse, I'd say the most important paragraph is: "I need to warn you that this Apocalypse is going to be somewhat radical. We'll be proposing changes to certain "sacred" features of regex culture, and this is guaranteed to result in future shock for some of our more conservative citizens. Do not be alarmed. We will provide ways for you to continue programming in old-fashioned regular expressions if you desire. But I hope that once you've thought about it a little and worked through some examples, you'll like most of the changes we're proposing here." And I do like them. The biggest change is more a change of philosophy than of syntax "Regexes aren't strings, they're programs." All the changes grow out of this one idea, to make regexes not just more powerful, but more usable. So, alot of little changes, yes, but if you lean back a bit from the details, you'll suddenly see a logical system, a language even. Overall, it's more yacc-ish than sed-ish. This is progress. :) A few quick highlights: - You can capture values to named variables right in the middle of the regex: /$word:=(\w*)/ - /x is now on by default, so you'll have much more readable regexes - All the final modifiers have been moved to the front s:g/// instead of s///g, and we're not limited to single letter modifiers anymore - {...} is now used for Perl code within regexes (this makes sense) - replaces {n,m} for user defined quantifiers - All those obscure little (?whatever) have been replaced with more meaningful structures - [...] is now non-capturing grouping (what a novel idea, make a common structure easy to write) - And character classes are now <[...]> which fits nicely with the general syntax of <...>, even if you do have to type a little more. - And if you don't like all the changes, you just type s:p5/// and everything works the old way. There's lots more. I'm quite happy with it. :) Allison --- To unsubscribe from this list, send an email to majordomo@hfb.pm.org with the following body: unsubscribe nashville-pm-list