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: 

How to escape regex in smart values

Raul Nemes
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 26, 2024

Hi, I'm trying to replace 3 characters in a string as part of an automation condition.  What I want to do is find each { } ~ and replace any of them with a space. My comment.body string will have multiple occurrences of those characters throughout.

effectively I'm trying: {{comment.body.replaceAll(REGEXGOESHERE, " ")}}

I want to use ({|}|~) in place of REGEXGOESHERE

When I try this it fails to get the comment body.

Any thoughts?

 

 

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
Raul Nemes
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 26, 2024

was able to get the Regex to work with [{}~] instead. 

0 votes
Divyanshu Gupta
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 26, 2024

[\{\}\~]

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events