The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Using Split to extract subsctring

Lisa Mendonsa
February 3, 2026

 

Hi everyone

I have a string (Jira Summary) that might look like this

<Some text> - <some more text> - <ID>

OR

<Some text> - <ID>

I basically want to get the value of the ID after the last '-'. 

If I use split() function, how can I reference the last occurrence/item in the returned list?

Thanks in advance

Lisa

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

2 votes
Bill Sheboy
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 Champions.
February 3, 2026
Lisa Mendonsa
February 5, 2026

Thank you, I managed to get this working using  {{issue.summary.split("-").Last().trim()}} 

Like # people like this
Bill Sheboy
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 Champions.
March 2, 2026

Hi @Lisa Mendonsa 

As you solved this one yourself, I recommend adding another answer to the question and then accepting it.  That will help others with a similar need find solutions faster.

Thanks!

TAGS
AUG Leaders

Atlassian Community Events