JEMH Trying to get regex to match multiple values and fill them in the field.

Jason Larmour April 15, 2015

I'm trying to figure out how to make the regexp in JEMH match multiple values for a field.

So the field will select how ever many options are chosen in that email.

I've tried a few configs with multiple regexp expressions (only the last one gets it's value entered)

I've used the (Charger - AC|Charger - Car): True which doesn't give me any value despite getting a match on both values.

(Charger - AC): True,(Charger - Car): True and (Charger - AC,Charger - Car): True just gives me a does not match.

 

the text it's checking against is:

Type of Device\t Type of Request\t Accessories\n
 Aircard: False\t New Activation: False\t Charger - AC: True\n
 Cell Phone: False\t Replacement Device: True\t Charger - Car: True\n
 Blackberry: False\t \t Case for device: True\n

 

The supported fields page says use a comma, but I can't see any thing suggesting how the comma is used.  Or it simply won't do what I'm after.

 

 

1 answer

0 votes
Andy Brook [Plugin People]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 15, 2015

Hi Jason,

Regexps are split on comma characters, so you can't use a literal comma in a regexp but you can use \x2c instead (wiki)

JEMH Regexp Field Processor has a field for determining matches, (match one or match many), values matching a given expression are then set against the target field, eg CSV results in a split on the comma generating many values, which could then populate a select custom field.

Its probably easier if you're having problems to log a support ticket, with your Profile XML and an example email, exported from JEMH auditing so that it can be reproduced.  Lay out what you want as final field values...

Andy Brook
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 16, 2015

ends up this was related to the Capture Group correctly pulling out values, but the Aliases that those values were supposed to match on to 'translate' to JIRA options, were not right, included text not captured, hence no Alias match, and no set option.

Suggest an answer

Log in or Sign up to answer