VB RegEx Question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Masterx81

    #1

    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|HP E]/
    \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!
  • Arthur Dent

    #2
    Re: VB RegEx Question

    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
    RequiredFieldVa lidator.

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

    "Masterx81" <enrico@je.netw rote in message
    news:fa523092-22d3-47af-b739-d5b68ac1ffee@d4 g2000prg.google groups.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|HP E]/
    \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!

    Comment

    Working...