I am working on a website. I am using C# corresponding to Visual Studio 2008. I want to make a text box that accept only numbers & comma(,).
For example,
-919981424199,78848817711,47171111747
or there may be a single number like 919981424199.
I was able to do one thing. My text box is only containing a number by using this regular expression validation. In its property->Validation Expression I wrote “[0-9]+”.
This is working, but now my requirement is to send bulk SMS, and each number is separated by (,).
I tried a lot, but I am not getting the answer. What is it?
Just add “,” to your regular expression. From memory I think it should be:
Source
To break the input into a list of numbers use
String.Split()with the comma as the delimiter:Then loop over the
numbersarray sending your SMS to each.