Barry,

The simple version would be,

Email:\*(.*)

The fancy version which accommodates a less rigid structure around the email address would be,

Email:\*.*([EMAIL PROTECTED],4}\b)

The simpler version would work on the following strings,

'Email:[EMAIL PROTECTED]' -> Extracts '[EMAIL PROTECTED]'

but would fail on the following,

'Email:* some text [EMAIL PROTECTED] some more text'

The fancy version would properly parse the email address and extract the following,
'[EMAIL PROTECTED]'

Ed

p.s. Note I have not tested the regexp in OTRS but it is a valid RegExp to match email addresses.


On 12-Sep-07, at 8:19 PM, * ProfitGrabber Support* wrote:

Need a little help with regex to parse a email address from the body of a email and set it as ContactID


The email address appears like this in the body (on its own line):


Email:[EMAIL PROTECTED]


I have tried this (I don’t know regex I was just guessing): Email:* ([EMAIL PROTECTED])


I tested an email and it gave me this as a Contact ID : [EMAIL PROTECTED]


So I’m close. A little help please.


Barry Keyles



_______________________________________________
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
Support or consulting for your OTRS system?
=> http://www.otrs.com/

_______________________________________________
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
Support or consulting for your OTRS system?
=> http://www.otrs.com/

Reply via email to