You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Problem:
Steps taken to solve:
Regex string being evaluated:
\w{3}-\w{7,12}-(EKS|ECS|Lambda|Dynamodb|DynamoDB)-\w+-{{issue.created.format("mmddyyyy")}}-\d{1,2}
If anyone is able to find some documentation about this it'd be appreciated!
Hi @Josiah Brown -- Welcome to the Atlassian Community!
Often the challenge is when there are nested quotation marks, as it seems you are trying: one set for the format() and another wrapping the regular expression.
I believe a work-around is to create the regular expression as a variable using Create Variable, and reference that as the expression. For example: match(varMyCreatedVariableName)
And also...the regular expression parser is documented as based upon the Java one, and there are several posts showing it does not match. When using a more complex expression, I recommend testing your expression by building it up in pieces, including a hard-coded date value, to confirm it works as you expect.
Kind regards,
Bill
Good morning Bill,
Thank you for the welcome and your help!
I only have one set of quotations for my regex and that is for the format(). I'm not too familiar with your workaround but you think it'll allow my regex to contain the smart value I've provided? Very interesting.
I know the rest of my regex works and I've tested the portion with the date using some regex with just \d{6} so it's just the question as to if you can pair smart values inside of regex.
One workaround is to add a step to do simple matching and see if the summary contains {{issue.created.format("mmddyy")}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I thought you were trying to use this regular expression in an automation rule, in which case the entire expression would be enclosed in quotation marks...unless it is already in a created variable.
If not in a rule, how are you using this regular expression?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.