473,472 Members | 2,039 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

VB RegEx Question

Hi to all...
I'm new to regex, so sorry for the silly question...
I want to do a client side validation for this string:

[r|ra|tc|tr|t|e|c|a|hpa|lpa|hpe|R|RA|TC|TR|T|E|C|A| HPA|LPA|HPE]/
\d{1,2}

But it passes also if the string is null, how i can prevent this?

I've read that the switch (?i) isn't working on the client js side, so
i've put all case variations, there is a better way to do this?

Really thanks to all!
Nov 28 '07 #1
1 916
As far as I know, most validators *will* fail (that is, pass) if the string
is empty.
The only solution I know of, is to use them in conjunction with a
RequiredFieldValidator.

to all: Maybe there is some other way someone could contribute?

"Masterx81" <en****@je.netwrote in message
news:fa**********************************@d4g2000p rg.googlegroups.com...
Hi to all...
I'm new to regex, so sorry for the silly question...
I want to do a client side validation for this string:

[r|ra|tc|tr|t|e|c|a|hpa|lpa|hpe|R|RA|TC|TR|T|E|C|A| HPA|LPA|HPE]/
\d{1,2}

But it passes also if the string is null, how i can prevent this?

I've read that the switch (?i) isn't working on the client js side, so
i've put all case variations, there is a better way to do this?

Really thanks to all!
Nov 28 '07 #2

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

Similar topics

4
by: engwar1 | last post by:
Not sure where to ask this. Please suggest another newsgroup if this isn't the best place for this question. I'm new to both vb.net and regex. I need a regular expression that will validate what...
8
by: vbmark | last post by:
I'm new to RegEx in vb.net so I'm not sure how to do this. I want to know if a string contains two minus signs "-". If there are two then I want it to return TRUE. I also need to know if the...
1
by: JM | last post by:
Hi, I am not sure if this is the place to post a REGEX question if not, please indicate me where i can post it?. My question: Given a string like: "Boston. MA. Holidays" I need to define the...
6
by: Sa¹o Zagoranski | last post by:
Hi, could someone help me putting together a regex expression for my problem? I need my search filter to treat spaces and commas in the query the same way no matter how many there are... ...
7
by: Extremest | last post by:
I am using this regex. static Regex paranthesis = new Regex("(\\d*/\\d*)", RegexOptions.IgnoreCase); it should find everything between parenthesis that have some numbers onyl then a forward...
2
by: GS | last post by:
How can one avoid capturing leading empty or blank lines? the data I deal with look like this "will be paid on the dates you specified. xyz supplier amount: $100.52 when: September 07,...
4
by: pedrito | last post by:
I have a regex question and it never occurred to me to ask here, until I saw Jesse Houwing's quick response to Phil for his Regex question. I have some filenames that I'm trying to parse out of...
3
by: Peter Proost | last post by:
Hi group first of all I need to say that I almost never use regex hence my question may be stupid. I'm using regex to find all words that start with an @ in a string. But the regex that I figured...
0
by: Tim N. van der Leeuw | last post by:
Hey Gerhard, Gerhard Häring wrote: I so far forgot to say a "thank you" for the suggestion :-) The sample code as you sent it doesn't do what I need to do, but I did look at it for...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.