On Nov 1, 2007, at 9:20 AM, Tim Wilson wrote:

On Wed, Oct 31, 2007 at  8:47 PM, in message
<[EMAIL PROTECTED]>, Darren Ellis
<[EMAIL PROTECTED]> wrote:

I am using ExtractCustomField to try to populate some custom fields by
scanning for values in the body of the incoming message.  My regexp
needs to match a starting string and then grab everything to the end
of the line.  I have the regexp working with egrep in the bash shell,
but my custom fields aren't being populated.

Darren,

I believe that the ExtractCustomField code is only able to inspect the email headers to look for matches. I don't think it can look in the message body.

Tim

It should look in the body without a problem. I've used it to parse email bodies in the past.

Darren

The newer versions of ECFV are reasonably chatty when run with debug logging.
What does it say about what it is trying to match against your regexp?

You may also want to test with perl instead of egrep.

perl -ne 'print $1 if /CSR Contact Name\s*([\w*|\s*])*/' CSRFile

For starters, I don't think you really want | or * inside a character class.

-kevin

_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

SAVE THOUSANDS OF DOLLARS ON RT SUPPORT:

If you sign up for a new RT support contract before December 31, we'll take
up to 20 percent off the price. This sale won't last long, so get in touch today. Email us at [EMAIL PROTECTED] or call us at +1 617 812 0745.


Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com

Reply via email to