Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

How to extract spesific chareters in below string?

I want to extract charecter from below string and use in Tag

tun-charectertoextract-xxx-"Charetertoextact"-xxx-xxx

1 answer

0 votes
Wei Wung
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Dec 03, 2022

Hi @Jugal_Shroff,  

Using the examples in our Regex doc, you can try the following for tag1 and tag2:

For Tag1: {{message.extract(/tun-(\S+)\-.*\-\"(\S+)\"-.*/, 1)}}
For Tag2: {{message.extract(/tun-(\S+)\-.*\-\"(\S+)\"-.*/, 2)}}

In the example text you gave, I am assuming the word "tun-" and the dashes following are "static".

The other option to try would be:

For Tag1: {{message.extract(/tun-(\S+)\-.*\-\"\S+\"-.*/)}}
For Tag2: {{message.extract(/tun-\S+\-.*\-\"(\S+)\"-.*/)}}

You can test the 2nd method in regex101.com as well, for example:

regex101-example.png

This is how I had tested:
AlertwithRegexExample.png

Hope the above point you in the right direction.  All the best!

Thanks for your help. Its not workking for me.

I want to tag details after tun-thiswillchange with new alert (my first tag)-xxx(not static)-thiswillchange with new alert (my second tag)-xxx(not static)-xxx(not static)

 

Example.jpg

my second tag contents charector and number combination minimum 2 and maximum 3 charector and number combinations

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events