Click here to Skip to main content
15,889,462 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I got exception when m using below code on databinding validation.
C#
if (Regex.IsMatch(Convert.ToString(value), "^(select) ([a-zA-Z0-9_, ])+ (from) +([a-zA-Z0-9_, ])*$"))
{
    return true;
}

throughs below Exception:
HTML
parsing "^(select) ([a-zA-Z0-9_, ])+ (from) +([a-zA-Z0-9_]*$" - Not enough )'s.

Help me.
thanks in advance.
Posted
Comments
ridoy 22-Aug-12 8:03am    
i'm not sure why you use such type of(one conversion,one query) parameters for Regex.isMatch()..!
prashant patil 4987 22-Aug-12 8:11am    
please tell me another way??
saguptamca 22-Aug-12 8:28am    
i have tried the same, works fine for me. What value are u using for condition??

The error means what it says, and the error indicates that the last ) is missing from the string being parsed. The error shows a different string to the one you pasted as your code.
 
Share this answer
 
Comments
prashant patil 4987 22-Aug-12 8:33am    
thanks Christian Graus
i have not seen that whole error.... thanks for reply..
yes nice one..
The error shows a different string to the one you pasted as your code.
 
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