Jira Automation smart value
split() in Jira Automation: syntax and examples
split() cuts a text value at every separator and returns a list of the pieces. Combine it with first, last, get() or size to pick a word, or iterate over the pieces in a later step.
Syntax
{{issue.summary.split(" ")}}
Arguments
| Argument | What it is | Required |
|---|---|---|
separator | The text to cut at. It is read as a regular expression. | yes |
Works on
- Fields: any text value
- Returns: a list of text pieces; use first, last, get(n) or size on it
Examples
{{issue.summary.split(" ").first}}Takes the first word of a summary, for example to address a name in a message.
Result:
HelloRun on Jira Cloud on .
{{issue.summary.split(" ").last}}Takes the last word.
Result:
World!Run on Jira Cloud on .
{{issue.summary.split(" ").get(1)}}Picks a piece by position. The first piece is number 0, so 1 is the second word.
Result:
World!Run on Jira Cloud on .
{{issue.summary.split(" ").size}}Counts the pieces.
Result:
2Run on Jira Cloud on .
{{issue.summary.split(" ").join("-")}}Chains join() to rebuild the text with another separator.
Result:
Hello-World!Run on Jira Cloud on .
{{#issue.summary.split(" ")}}<{{.}}>{{/}}Iterates over the pieces and wraps each one.
Result:
<Hello><World!>Run on Jira Cloud on .
Pitfalls
- The separator is a regular expression. In a description with several sentences,
split(". ")treats the dot as any character, so.firstgave Checkou, cut at the t before the space (checked on Jira Cloud, November 2026).split(".")gave an empty list with size 0. - A pipe is also special.
split("|")on the summary plus|xgave a list of 14 pieces, one per character, so escape it or pick another separator. - Repeated separators create empty pieces.
split("l")on Hello World! gave He, an empty piece, o Wor and d!. With three spaces between the words, the list has 4 pieces, not 2. - When the separator does not occur, the list has one piece, the original text.
split("Z").firstgave Hello World! unchanged.
Related
- first, last, get(), getFromEnd()
- join()
- {{#list}}…{{/}} iteration
- match()
- replace(), replaceAll() and remove()
- size and isEmpty on lists