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: 

Regex Validator

Paul Krueger
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.
November 21, 2024

I'm trying to use a validator to make sure issues with "<Update Text>" in the description can't transition. The regex I think should work is this: 

^(?:(?!<Update Text>).)*$

I've also tried this:

^(?!.*<Update Text>).*$[\s\S]*

Either way, it's not working.  

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
Jim Knepley - ReleaseTEAM
Atlassian Partner
November 21, 2024

Hi @Paul Krueger 

Superficially, it seems you could match without the extra anchors and lookahead assertions.

<Update-Text>

I suspect that I don't completely understand what you're hoping to solve. Could you post a sample description that you believe should match?

Paul Krueger
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.
November 21, 2024

Yes, that would match if that text were in there, but I need it to match when the text isn't there.

Jim Knepley - ReleaseTEAM
Atlassian Partner
November 21, 2024

I understand. Try this:

^((?!<Update Text>).)*$

 

Paul Krueger
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.
November 26, 2024

That did the trick. Thank you so much!

DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events