Click here to Skip to main content
15,893,508 members
Please Sign up or sign in to vote.
1.00/5 (4 votes)
See more:
i need a code that will upload phone numbers, display the numbers and if a number is a valid phone number, send sms message to the number.

Moved from OP's "solution":
[Edit]

C#
namespace _11_RegularExpressions
{
    class Class1
    {
        [STAThread]
        static void Main(string[] args)
        {
            Regex phoneExp = new Regex(@"^(234[7|8][0|1][2-9])([0-9]{7}$");
            string input;
            Console.Write("Enter a phone number: ");
            input = Console.ReadLine();
            while (phoneExp.Match(input).Success == false)
            {
                Console.WriteLine("Invalid input. Try again.");
                Console.Write("Enter a phone number: ");
                input = Console.ReadLine();
            }
            Console.WriteLine("Validated!");

[/Edit]
Posted
Updated 21-Jun-11 6:30am
v3
Comments
ambarishtv 21-Jun-11 9:24am    
??

Your solution is to pick up your C# textbooks and read them. Then write some code. When that code has bugs, ask us regarding those bugs and we'll be glad to help you. We will NOT do your homework for you.
 
Share this answer
 
Comments
Manfred Rudolf Bihy 21-Jun-11 12:30pm    
Agreed! 5+
How do you want send SMS ? I have code to do it with Google Voice and php I did integrated with MS Access you can do it with C#
Google voice api
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900