-
Bug
-
Resolution: Unresolved
-
Low
-
Minor
-
Jira Software, Jira Service Management, Jira Work Management
Issue Summary
Including a double quote (") in the regex pattern results in the string being cut short before it's sent to the Match function. and it is not possible to escape the double-quote character.
Steps to Reproduce
- Create an automation rule
- Create a variable named text with the following value:
cl = {AAA a aaa aa AAA=[AAAA {fieldId='customfield_10154', field='AA aa aa to aaa', fieldType='null', from='12345', fromString='Best possible fit', to='12345', toString='Very good'} ]}
- Log the following match function:
{{text.match("fromString=\'([a-zA-Z0-9\"\-\[\]\/\\!£$%^&*()_+={}:@~;'#<>?.| ]*)\'")}}
- Notice that the "\ part doesn't work as desired although it works in Java - see the link https://regex101.com/r/hQ91BF/1
- However, if you log the above match function without the "\ part, it works correctly:
{{text.match("fromString=\'([a-zA-Z0-9\-\[\]\/\\!£$%^&*()_+={}:@~;'#<>?.| ]*)\'")}}
Expected Results
It should be possible to escape the double quote (") within the match function.
Actual Results
It is not possible to escape the double quote (") within the match function.
Workaround
1) Create a variable, named varRegEx. Note the outer double-quotation marks have been removed.
fromString=\'([a-zA-Z0-9\"\-\[\]\/\\!£$%^&*()_+={}:@~;'#<>?.| ]*)\'
2) Perform the match, passing the variable as the search
{{text.match(varRegEx)}}