473,800 Members | 2,413 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

RegularExpressi onValidator Problem!

I've got a RegularExpressi onValidator that partly works. Let me
explain:

With the Validator below I am only able to search for one letter/number
at a time. If I want to search for Diana I see 'Valid Search String',
but if I search for A then I see all 113 results. Am I missing
something here?

<asp:RegularExp ressionValidato r id="revMenuSear ch"
ValidationExpre ssion="[^!#^()<>/]" ControlToValida te="tbSearch"
Display="Static " ErrorMessage="V alid Search String" runat="SERVER" />

Nov 19 '05 #1
2 1209
Try visiting this site at:-
http://www.regexlib.com/

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #2
I'm not sure exactly what rules you want. But its clear what the problem is.
Here's an updated expression:
^[^!#^()<>/]+$
^ = from the start
$ = to the end
+ = one or more of the previous expression must be found

--- Peter Blum
www.PeterBlum.com
Email: PL****@PeterBlu m.com
Creator of "Profession al Validation And More" at
http://www.peterblum.com/vam/home.aspx

"Sparky Arbuckle" <tw*@secureroot .com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
I've got a RegularExpressi onValidator that partly works. Let me
explain:

With the Validator below I am only able to search for one letter/number
at a time. If I want to search for Diana I see 'Valid Search String',
but if I search for A then I see all 113 results. Am I missing
something here?

<asp:RegularExp ressionValidato r id="revMenuSear ch"
ValidationExpre ssion="[^!#^()<>/]" ControlToValida te="tbSearch"
Display="Static " ErrorMessage="V alid Search String" runat="SERVER" />

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3017
by: Andy Eshtry | last post by:
I have a radio button list, a textbox representing SIN or EIN based on my radio button list selection so I put 2 regularexpressionvalidator to evaluate the value of textbox. EIN must be (for simplicity) with this format (2 digits) like 12 (ValidationExpression="\d{3}-\d{2}") and SIN must be (for simplicity) with this format (3digits-2digits) like 123-45 (ValidationExpression="\d{3}-\d{2}") It works well. The problem is: When I...
3
3799
by: Ricardo Corsi P. Cesar | last post by:
Hi, i looking for example in asp.net (VB) to make the RegularExpressionValidator in runtime in my code behind. I found some similars codes, but nothing in VB.. thanks!
1
3692
by: Ken Grimmett | last post by:
I have added a REV to an input type of file. I want to make sure that the only file type that is allowed is a .gif, .jpg, or .jpeg. I develop my site on my laptop which is running Win XP Pro and my site is hosted on a Win 2000 Advanced server. Here is my problem. When I test it on my local host of the XP Pro machine the validator works. When I migrate it to the W2K box it doesn't work. There is no error that is displayed. Is anyone...
2
2496
by: Enzo Marinelli | last post by:
Hello everyone I have a MultiLine TextBox, as follows <asp:TextBo Id="StreetAddress Rows="4 Runat="Server TextMode="MultiLine Width="100%"/
3
3682
by: tshad | last post by:
I have a RegularExpressionValidator that doesn't seem to work correctly if you don't enter anything. In the following, it works correctly if you have at least 1 character. If you just enter through the field it lets you (even thoug no entry would be less that 6 characters. <asp:textbox id="password1" TextMode="Password" Columns="45" runat="server" /><asp:label text=" 6-20 characters with at least 1 numeric" style="color:red"...
1
1849
by: franz | last post by:
does anybody tell me why it doesn't works?? in any case gg beame true thanks franz Dim y As RegularExpressionValidator = New RegularExpressionValidator y.ValidationExpression = "^\w+(\w+)*@\w+(\w+)*\.\w+(\w+)*$" y.ControlToValidate = "ss5ssss" Dim gg As Boolean = y.IsValid
1
1495
by: John Yopp | last post by:
I'm trying to use a asp:RegularExpressionValidator to validate the strength of a password. When I test the regular expression with Regex.IsMatch, it works perfectly. However, when used within a RegularExpressionValidator, it always returns false. Has anyone else had issues with the RegularExpressionValidator not correctly parsing a regular expression? The regular expression I am using is: "^.*(?=.*\d)|(?=.*)|(?=.*)(?=.*)(?=.{8,}).*$"
4
6058
by: =?Utf-8?B?Y3VyaW91cw==?= | last post by:
I am using a RegularExpressionValidator to validate a TextBox. I use "^?+(\.*)?$" to check for a real number. The control works fine as long as the user enters something in the TextBox; it does not work if the user leaves the TextBox blank. Is there a bug in the implementation of the RegularExpressionValidator? The above regluar expression should also catch no entry by the user. I have added a RequiredFieldValidator to solve the...
9
3931
by: Nathan Sokalski | last post by:
I have several TextBoxes with TextMode="MultiLine" in which I want to limit the number of characters that can be entered using a RegularExpressionValidator. I have come up with the following ValidationExpression: {0,250} The only problem with this ValidationExpression is that it does not include the \n character as stated on the following documentation page:
0
9691
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10276
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10035
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9090
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6813
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2945
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.