| Author |
validating a syntax
|
anoop kerala
Greenhorn
Joined: Mar 03, 2010
Posts: 10
|
|
hi,
i want to verify a string whether its given in the format,
a=b+c;
and prompt error if given,
1) a=;
2) a;
3) a=b+;
thank you..
lenin
|
 |
Aditya Kanitkar
Ranch Hand
Joined: Aug 08, 2009
Posts: 72
|
|
a=b+c
You will have to form a Regular Expression which resembles to "c=a+b"
Any string that unmatches the given format/expression can be identified.
|
 |
Sherif Shehab
Ranch Hand
Joined: Mar 05, 2007
Posts: 472
|
|
|
Hi , You need to use Regular Exp.
|
Thanks,
Sherif
|
 |
David Newton
Author
Rancher
Joined: Sep 29, 2008
Posts: 12617
|
posted

0
|
|
What have you tried so far?
|
 |
anoop kerala
Greenhorn
Joined: Mar 03, 2010
Posts: 10
|
|
|
tried but not postable..
|
 |
David Newton
Author
Rancher
Joined: Sep 29, 2008
Posts: 12617
|
posted

0
|
|
Here's the thing--we need you to DoYourOwnHomework. Without evidence of ShowSomeEffort, you're not likely to get much help.
|
 |
anoop kerala
Greenhorn
Joined: Mar 03, 2010
Posts: 10
|
|
|
ok thanks.. i will try to come up with a postable code..
|
 |
 |
|
|
subject: validating a syntax
|
|
|