Hi Guys!
I'm using the following regular expression to only allow numbers and hyphens, I just put a number like: 75648-a he allowed.
Exp:
"^[0-9]|[-]*$"
Hi Fabiano,For the pattern that you've wrote, here's the Regular Expression:^[0-9]+([0-9]|-[0-9])+$
You can try it with the values you added here on https://regexr.com/
Hi Fabiano,
You can use this "^[0-9]+([0-9]-)+$" it will validate numbers + hyphen.But note this is for the use case: 75648-
If you want a specific pattern, let us know.
Also this web site is really cool on helping create regexs:https://regexr.com/
Thank you.
In this case, the input number pattern will be:
896644-7
8966447
24515-0
6874598235
Thank you!