in reply to Grouping regular expressions

I assume your immediate problem is that you want to group without capturing. Use the non-capturing group brackets:

/(?:some|stuff)(?:more|stuff).../

I note in your second example however that you may be intending to use regexen for processing HTML. As noted many times before, life is too short to reinvent that particular wheel - there are far too many subtle edge cases and you will get bit! Much better to use tools such as HTML::TreeBuilder or, if you are dealing with XHTML, XML::Twig.


DWIM is Perl's answer to Gödel