Ah, yeah thanks. It just seems like functionality that should be there but isn't.. but even if it is a shortcoming in regex, where would we be without regex? I remember trying to do complex replace()s years ago before I knew what regex was.
On Fri, 31 Dec 2004 12:49:04 -0500, Michael Dinowitz <[EMAIL PROTECTED]> wrote: > Do a 2 step process. Use the code that was posted to the original thread as > the second step with the first step looking for any nested blocks. Deal with > the nested first and then what's left will be non-nested. You may have to > loop the nested to deal with multiple nesting, but that should a small > check. > I'm in a slightly different code frame of mind but I'll revisit the code I > wrote for you when I get home. > > > I'd forgotten that I even joined this list.. until Michael's email > > come in through it... > > > > I posed this to the cf'ers and none of us had a good answer other than > > cflooping which I'd prefer not to do. > > > > I want to do a BBML.. and I have this as a sample.. > > > > [quote who="Tony1"]Quote 1[/quote] > > [quote who="Tony2"]Quote 2[/quote] > > [quote who="Tony3"][quote who="Tony4"]Quote 4[/quote][/quote] > > > > My regex is > > > > \[quote who="([^"]*)"\](.*?)\[/quote\] > > > > And what troubles me is that when I perform it on the paragraph > > above.. It finds the first quote ok, and the second... It picks up the > > [quote...] from the third set and the [/quote] from the fourth set... > > > > So I end up with Quote 1 Quote 2 [quote who="Tony4"]Quote 4[/quote].. > > > > I'd think regex would have the ability to do "([^"]*)" only with > > strings instead of quotes... but [^abc] as we all know does not > > disallow abc but disallows a or b or c. > > > > I was just hoping some regex guru was napping over here. > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:21:802 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/21 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:21 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.21 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
