Hello everyone,
I have a problem and wanted to ask for advice: I have a field in which a table is contained. Through an automation and a regular expression I fetch words, but I noticed that it also fetches the table and cells in which the words are contained not only. Is there any way to fix this and only fetch the words?
Thanks
Hi @FrancoB
Welcome to the community.
Look at this community request. Tis was recently raised and resolved.
I think it is similar to what you are requesting.
Hi @Marc - Devoteam
thanks for the link it was really helpful to me.
Through this I was able to do partly what I needed to do:
{{issue.description.match(“(?<=\Start:\|)([^|]+)”)}}
I just have a problem that the word I need to search for “Start:” is sometimes written as a hyperlink and therefore is not considered.
Unfortunately I import the text from an email and it contains formatting, I also tried converting it .text but unfortunately I find that the word I need to extract Ex. Home is written under the word Start: and so even then it doesn't work, like this
Start:
Home
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @FrancoB -- Welcome to the Atlassian Community!
IMO, the match() function in automation rules does not consistently handle things like text containing newlines, and other formatting. As a result, it can terminate the searching earlier than expected.
A workaround for that is to first replace all the newlines before the match attempt:
{{issue.description.replace("\n", " ").match(your expression)}}
And when the newlines are needed for later processing, they may be first replaced with a known value, and then set back later. For example:
{{issue.description.replace("\n", "~~~").match(your expression).replace("~~~", "\n")}}
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.