Freelance Projects

All freelance projects at One Location


Help With Regex & Email  07.06.08

I have an account with an autoresponder/mailing list service (Aweber.com) and they have an email parser so the system can extract data from an email sent to it and store it in a relevant field (name, email, etc.) in its database.

Here’s the problem.

My ordering system will send a simple email with the customer’s name and email address on the same line, so when the email parser is triggered, the email address in the “From:” line in the headers:

John Smith <the email address would be here>

is entered into the “email” field in that autoresponder.

This is the regex I’m using: \s+.*?\b([^< ]+AT[^> \n]+)

(AT being the regular email AT sign)

What I can’t figure out is how to use regex rule to exclude everything after and including “<” so only the customer’s NAME is stored in Aweber’s “Name” field.

This is the current regex I’m using:

From:\s+(.*?)(\n|$)

Which paste the name AND email address into the Name field.

Are there any Regex “gurus” out there that can help me with this?



If you liked this project, make sure you
Subscribe to Freelance Projects RSS feed!




    • Your Ads Here
    • Your Ads Here