I'm trying to extract a piece of text from a ticket's description and post it in a comment.
Sample description:
Using regex101 set to Java the following regex seems to match the correct body:
However when I use this in the automation I get nothing back. When I remove the terminal string "Out of scope"
I get the first line "Acceptance Criteria:" but nothing after
What am I missing here? Can someone assist?
Short answer: try using text functions and / or the simplest possible regex and then experiment to confirm it works as desired.
First thing: there is no documentation on what actual is, or is not, supported with regular expressions in automation rule handling. What the documentation states, with italics added by me:
The underlying implementation is based on Java's Pattern class and uses Matcher.find() to find matches...
There are many community posts where people tried something which works with online regex validators which does not work in rules. Two known causes are: racetrack timing problems and the order in which escaping happens. Additionally, the match() function specifically seems to have intermittent problems when there are newline characters in the source expression.
My recommendations are:
Perhaps start with a test rule and simple regex, and incrementally modify the expression from there.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.