I need a regular expression to allow just numeric and (.-/
)
It should allow something like that:
011.235673.98923/0001-12
The pattern you're looking for, that matches only those strings with numbers, ., -, and /:
^[0-9\.\-\/]+$
If you have a specific language you're looking to implement this I may be able to help you.
How about something like
(\d|\.|\-|\/)*
Does it matter how many -
and .
and /
you get? Does the order matter?
^[\d./-]*$
does this. What regex flavor are you using? Perhaps it needs to be adjusted for it.
to be sure it's in right order and require every part
^(\d+)(\.(\d+))*(\/(\d+))*-(\d+)$
edit: Forgot to add the / sry
You're looking for ^[\d./-]+$