On Sat, 2008-11-29 at 20:56 -0800, ZuLuuuuuu wrote: > How can I match structures like > this: > > [block] > this is a block > [block] > this is another block > [/block] > first block ends > [/block] >
You can't. In order to correctly interpret a structure like this you need a finite-state automation (FSA) with a push-down stack. This structure has unbounded nested contexts which means anything simpler won't work. If you want to parse HTML, I suggest you download HTML::TreeBuilder from CPAN http://search.cpan.org/author/PETEK/HTML-Tree-3.23/lib/HTML/TreeBuilder.pm -- Just my 0.00000002 million dollars worth, Shawn The key to success is being too stupid to realize you can fail. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/