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

Regular expression validators

I am using Regular expression validator  during the create transition.

REvalidator.PNG

I am using [a-zA-Z0-9_=+-] because I need to allow special charterers (_,+,-,=, ).

Am I doing something wrong because this is not working and throwing error whenever i place '_' symbol.

 

2 answers

While using regular expression to validate input data from user. 

So, what ever you wrote a regular expression in attributes should enclosed by parenthesis. 

For example:

([A-Za-z0-9+_= -]*) 

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Nov 13, 2018

Sometimes you need to escape certain characters in order to have regex search for them. Since the syntax can be a little different depending on the interpreter.  Instead of using your string of

[a-zA-Z0-9_=+-]

try this one

[a-zA-Z0-9\_\=\+\-]

The character of '\' can be used to tell a regex to search specifically for the next character and not use that character's special regex function.   I don't know of any special function for the _ character in regex, but I think you can still try to escape it incase it is causing this to fail to match a character set you are looking for.

No it was not working.

I tried to do as below and it is working

[A-Za-z0-9+_= -]*

Suggest an answer

Log in or Sign up to answer