Categories
How to make a regular expression for digits, % and dashes?
I am not strong in this direction, so I turn to you. I need a regular expression to enter numbers% - something like this: (15% -10% -1%) in this format:pattern="^[_A-z0-9]{1,}$"
pattern="^[_A-z0-9]{1,}$"
Answer the question
In order to leave comments, you need to log in
If I understand correctly, then you need this? or ^[\d\-%]+$ https://regex101.com/r/MIa0AE/1
^[\d\-%]+$
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question