tags:

views:

220

answers:

1

Hello All,

I'm having a bit of difficulty figuring out how to use this Regular Expression which Aweber provides for email parsing.

I'm supposed to be able to send an email to aweber, with this ruleset, and aweber will add the email to my list.

Here is the rule:

Trigger Rule:    From:[^\n|.]+user\@domain\.com | MATCH HEADERS
Rule 1:          \n[>\s]*Email:\s+(.+?)\n       | MATCH BODY
Rule 2:          \n[>\s]*Name:\s+(.+?)\n        | MATCH BODY

Does anyone know how this works? What format does the regular expression expect to receive?

Thank you soooo much for your help!

Best, Nick

+1  A: 

Assuming your answer to my comment above doesn't substantively change the intent:

Trigger Rule:    From:[^\n|.]+user\@domain\.com | MATCH HEADERS
# Match "From:" and "[email protected]" all on the same line

Rule 1:          \n[>\s]*Email:\s+(.+?)\n       | MATCH BODY
#Match "<<beginning of line>> <<some white space, or maybe not>> "Email:" <<some white space, but maybe more>> <<anything and everything until the end of the line>>

Rule 2:          \n[>\s]*Name:\s+(.+?)\n        | MATCH BODY
#Match "<<beginning of line>> <<some white space, or maybe not>> "Name:" <<some white space, but maybe more>> <<anything and everything until the end of the line>>

Edit:

The lines marked "<<some white space, or maybe not>>" should be "<<some white space, or several ">" characters, or maybe none of these>>

anschauung