[thelist] Regex help

Anthony Baratta anthony at baratta.com
Wed May 2 16:15:15 CDT 2007


Here's what I came up with:

START(.*?)START(.*?)END

Will return 3 groups of matches. The first group will be everything between the first START and the END. The second group will be everything between the first START and the SECOND start, and the last group will be everything between the second START and the END.

You can test the above REGEX against any test strings you have here:

http://www.fileformat.info/tool/regex.htm

Hopefully that will get your "started". ;-)

-----Original message-----
From: "Tab Alleman" talleman at Lumpsum.com
Date: Wed, 02 May 2007 13:16:10 -0700
To: "Evolt Thelist \(E-mail\)" thelist at lists.evolt.org
Subject: [thelist] Regex help

> 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":
> 
> START.*?END
> 
> 
> 
> -- 
> 
> * * 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