How to write regular expression that matches only numbers,text and only these two special characters # and –
[a-zA-Z0-9#-\s]+ anything else should be rejected
How to write regular expression that matches only numbers,text and only these two special
Share
You could a regular expression similar to this
Below the code I used for checking the regular expression in c#:
Also, for future reference material, you could see this regular expression site: http://www.regular-expressions.info/