in reply to Problems with regex grouping

Have you thought about taking a different approach and using CPAN modules to do the work for you? Since you are searching for email addresses in a string, this looks like the perfect job for Email::Find.

Here is some working sample code to demonstrate how it's used.

  • Comment on (dkubb) Re: (1) Problems with regex grouping