http://www.perlmonks.org?node_id=168232


in reply to Quick question on matching

Ah! Thank you everyone for your help. It was exactly what I needed. Using parentheses never even occurred to me. I have Learning Perl and it seems to hint at using 1, 2, 3, etc. as remembered patterns, but even then, I didn't notice it until after I read everyone's response here. Hopefully I'll be able to pick up Mastering Regular Expressions this week and work on my regex building. Thanks again.