2
I need to create an expression for the following case of a code field:
- No maximum number of characters
- The first digit should only be numbers [0-9]
- The code is composed of alphanumeric digits and only the characters / (bar) and - (hyphen), and not always have all of them.
I tried to start one, but without success:
^[0-9][a-zA-Z0-9\/-]+$
Example of results
valid:
260509
8605/05
5ABC605/05
756574-7
88BS-AS0
Invalid:
A8605/05
B756574-7
What problem are you having Marcelo? I tested your regex and it worked, of course it can be improved but you reported that it had not worked and when testing it all worked.
– Erick Gallani