Reputation: 435
What should be the Regex to allow a string that contains only numbers (0-9) or dashes (-) or dots (.)?
And disallow when a string contains otherwise (like alphabets or other special characters not listed above).
Example: Allowed
Disallowed
Upvotes: 6
Views: 18015