Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

REGEX - Allow Numbers and . - /

Tags:

regex

I need a regular expression to allow just numeric and (.-/)

It should allow something like that:

011.235673.98923/0001-12

like image 856
Learning Xamarin Avatar asked Sep 02 '11 21:09

Learning Xamarin


1 Answers

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.

like image 163
ShaneC Avatar answered Oct 21 '22 19:10

ShaneC