Email address parsing is really, really hard to do correctly, without breaking things and annoying users..
First, I would question if you really need to do this? Why do you have multiple email addresses, with different sub-addresses?
If you are sure you need to do this, first read rfc0822, then modify this email address parsing regex to extract all parts of the email, and recombine them excluding the label..
Slightly more.. practically, the Email Address wikipedia page has a section on this part of the address format, Sub-addressing.
The code powtac posted looks like it should work - as long as you're not using it in an automated manner to delete accounts or anything, it should be fine.
Note that the "automated labeler" isn't a GMail specific feature, Gmail simply popularised it.. Other mail servers support this feature, some using +
as the separator, others using -
. If you are going to special-case spaces in GMail addresses, remember to consider the googlemail.com
domain also