Hi, Community!
I need your help with a little something.
I'm trying to pull the name and surname from the reporter's email for better automated messaging. I'm testing the following part of this automation for now:
Log action:
Matching result is {{issue.reporter.emailAddress.match("[^\W\d_]+(?=.*@)")}}.
The regex in the match function is supposed to grab any words (any strings that are not [^ made of non-word characters \W, digits \d or the underscore characters _]) before the @ mark and return them as matching results in an array. See regex101 here - it does what it should with Java 8 Engine. Smart values documentation links to Java 7 documentation, but the same character classes are listed there
Anyway, the problem is that my logs keep returning just
Matching result is
I tried putting the regex with and without the quote marks and nothing works.
I also tried {{issue.reporter.emailAddress.match("[^\W\d_]+(?=.*@)").first}} and {{issue.reporter.emailAddress.match("[^\W\d_]+(?=.*@)").get(0)}} without any success.
{{reporter.emailAddress}} is logged correctly.
All help is appreciated.