Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#4.0 Silverlight4
I got exception when m using below code on databinding validation.
if (Regex.IsMatch(Convert.ToString(value), "^(select) ([a-zA-Z0-9_, ])+ (from) +([a-zA-Z0-9_, ])*$"))
{
    return true;
}
throughs below Exception:
parsing "^(select) ([a-zA-Z0-9_, ])+ (from) +([a-zA-Z0-9_]*$" - Not enough )'s.
Help me.
thanks in advance.
Posted 22-Aug-12 1:52am
Comments
ridoy at 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 at 22-Aug-12 8:11am
   
please tell me another way??
saguptamca at 22-Aug-12 8:28am
   
i have tried the same, works fine for me. What value are u using for condition??
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Comments
prashant patil 4987 at 22-Aug-12 8:33am
   
thanks Christian Graus
i have not seen that whole error.... thanks for reply..
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

yes nice one..
The error shows a different string to the one you pasted as your code.
  Permalink  

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

  Print Answers RSS
0 Maciej Los 245
1 OriginalGriff 210
2 Manfred R. Bihy 190
3 CHill60 180
4 _Amy 155
0 OriginalGriff 7,445
1 Sergey Alexandrovich Kryukov 6,177
2 Maciej Los 3,774
3 Peter Leow 3,478
4 CHill60 2,702


Advertise | Privacy | Mobile
Web04 | 2.8.140721.1 | Last Updated 1 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100