Click here to Skip to main content
15,888,044 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi friends,

I am using regex expressions in my project to extract the phone numbers..
Now, I am using an expression like this ..

C#
var exp = new Regex(@"#?[0-9\s\-\(\)]{4,20}", RegexOptions.IgnoreCase);


What I want is to get the numbers having more than 4 digits.
But its counting everything in the expression... For eg: It returns (20) and this too....
How can I choose only if the numbers are more than 4 digits, and select the rest if it contains this special characters...

Sorry for my english...
Posted

1 solution

I think you will be clear when you study this Regular_expression[^] you will still get a clear and new idea. You have more questions on this particular topic is better to refer that and sorry if you already refereed it completely .If i get any idea i will post it soon.
 
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