Hello Darren,
for historic reason ECFV uses "|" as delimiter in the template. If you use
"|" in your regexp what you do the template will not behave as you might
expect.
You can redefine the separator ECFV uses by inserting a line at the
beginning of your scanner template, e.g.
Separator=<#>
then you write
Customer Name<#>body<#>CSR Contact Name\s*([\w*|\s*])*<#><#>
though I think you mean
Customer Name<#>body<#>CSR Contact Name\s*([\w\s]*)<#><#>
which will match "Test Customer" into your custom field.
You will need ECVF Version 1.1b2 or later to change the separator. Actual
version is 1.2b3
<http://page.mi.fu-berlin.de/pape/rt3/ExtractCustomFieldValues.tgz>
Regards,
Dirk.
--Am 31. Oktober 2007 21:47:33 -0400 schrieb Darren Ellis
<[EMAIL PROTECTED]>:
Hello,
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.
Here's the output of the egrep command:
[EMAIL PROTECTED] ~]$ egrep 'CSR Contact Name\s*([\w*|\s*])*' CSRFile
CSR Contact Name Test Customer
[EMAIL PROTECTED] ~]$
Here's the contents of CSRFile:
[EMAIL PROTECTED] ~]$ cat CSRFile
CSR Contact Name Test Customer
[EMAIL PROTECTED] ~]$
Here's the relevant line of my CFExtract Template (#18):
Customer Name|body|CSR Contact Name\s*([\w*|\s*])*||
Here's the contents of my Scrip (#16)
Description: CFExtract
Condition: On Create
Action: Extract Custom Field Values
Template: CFExtract
Stage: TransactionCreate
I do have one working that simply grabs a number from the subject line,
so I believe that the ExtractCustomField add-on is working properly.
Could some kind regexp/rt expert point me in the right direction?
Thank you.
Darren
Darren Ellis
[EMAIL PROTECTED]
Office: (207) 376-0137, x2201
Mobile: (207) 841-4000
_______________________________________________
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