[thelist] Regex help

Tab Alleman talleman at Lumpsum.com
Wed May 2 16:15:39 CDT 2007


I thought about trying ^(START), but what would the group-capturing implications be?   The chunk I gave in my example is a part of a larger pattern that grabs a capture group.  I wouldn't want to mess up that functionality.

> -----Original Message-----
> From: thelist-bounces at lists.evolt.org
> [mailto:thelist-bounces at lists.evolt.org]On Behalf Of Matt Warden
> Sent: Wednesday, May 02, 2007 4:50 PM
> To: thelist at lists.evolt.org
> Subject: Re: [thelist] Regex help
> 
> 
> On 5/2/07, Tab Alleman <talleman at lumpsum.com> wrote:
> > Been trying to figure this out, but I haven't found a way 
> to do what I want in any of the tutorials out there.
> >
> > Say I've got a string like this:
> >
> > any combination of characters + "START" + any combination 
> of characters except START + "START" + any combination of 
> characters except START + "END" + any combination...
> >
> >
> >
> > I want to create a regex that will grab the chunk of the 
> string between the SECOND "START" and the next "END".  The 
> pattern I created grabs from the FIRST "START" to the first "END":
> >
> 
> Not all that confident in this syntax because I haven't had to "not" a
> word before, but...
> 
> ^(START)*START(^(START)+)START^(START)+END.*
> 
> I'm not sure that's how to "not" a string, so you'll need to look that
> up. But that's the idea. The first (possibly second if the first set
> of parens is considered a grouping) match in the returned matches
> should be the value you want.
> 
> -- 
> Matt Warden
> Cleveland, OH, USA
> http://mattwarden.com
> 
> 
> This email proudly and graciously contributes to entropy.
> -- 
> 
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
> 
> For unsubscribe and other options, including the Tip Harvester 
> and archives of thelist go to: http://lists.evolt.org 
> Workers of the Web, evolt ! 
> 



More information about the thelist mailing list