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 Silver Sponsor - New Atlanta http://www.newatlanta.com Message: http://www.houseoffusion.com/lists.cfm/link=i:21:801 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
