Simple Regular Expression? [modified]
-
How to make a textbox not accept certain words? Example : can not contain word "dog" in a string I hv tried negative lookahead (?!regexp) and many other method i found through google, but none of them work. I'm using RegularExpressionValidator in VS 2003. Izzit related? -- modified at 2:01 Wednesday 27th September, 2006
-
How to make a textbox not accept certain words? Example : can not contain word "dog" in a string I hv tried negative lookahead (?!regexp) and many other method i found through google, but none of them work. I'm using RegularExpressionValidator in VS 2003. Izzit related? -- modified at 2:01 Wednesday 27th September, 2006
You can use javascript regular exepression for that purpose: here you can get the required help regarding javascript regular expression: http://www.webreference.com/js/column5/[^] http://www.javascriptkit.com/javatutors/re.shtml[^] :)
Best Regards, Apurva Kaushal
-
You can use javascript regular exepression for that purpose: here you can get the required help regarding javascript regular expression: http://www.webreference.com/js/column5/[^] http://www.javascriptkit.com/javatutors/re.shtml[^] :)
Best Regards, Apurva Kaushal
-
Anyway, Thx for your help. But i'm quite new to regular expression. I still not sure what to put. Appreciate if someone can give me the solution. Thx
-
How to make a textbox not accept certain words? Example : can not contain word "dog" in a string I hv tried negative lookahead (?!regexp) and many other method i found through google, but none of them work. I'm using RegularExpressionValidator in VS 2003. Izzit related? -- modified at 2:01 Wednesday 27th September, 2006
-
It depends what exactly you want your user not to put in the textbox. I hope it won't be "dog" as you mentioned. :)
Best Regards, Apurva Kaushal
-
haha, it just an example. Finally i found the solution. ^((?!(illegal)).)*$ but regular expression is case sensitive. that's mean words like "illegAL" will not work... i think i better use back the .net code... anyway, thx ..
neo_6053 wrote:
regular expression is case sensitive
ya by default it is case sensitive but you can make that case insensitive. You just to set the flag. Here you can get the detsila: http://www.evolt.org/article/Regular_Expressions_in_JavaScript/17/36435/[^]
neo_6053 wrote:
anyway, thx ..
always welcome.. :)
Best Regards, Apurva Kaushal