Click here to Skip to main content
15,910,009 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hello..........

I am beginner in c# programming, want to know How does this code executes. Kindly describe in detail.

!System.Text.RegularExpressions.Regex.IsMatch(e.KeyChar.ToString(), "\\d+")

Soon reply will be appreciated.....!!!!

Thanks....
Reply·Email·View T
Posted
Comments
Shanmugam Rathakrishnan 24-Jan-13 1:02am    
\d is a digit, + is 1 or more numbers, so a sequence of 1 or more digits
[no name] 30-Jan-13 7:13am    
Hi please describe your query in details for understanding.

1 solution

C#
Regex r = new Regex("^[a-zA-Z0-9]*$");
if (r.IsMatch(SomeString)) {
  ...
}
 
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