RE: Newbee question on regular expressions
From: vvenk (vvenk_at_discussions.microsoft.com)
Date: 11/10/04
- Next message: Mohamoss: "RE: MessageBox question"
- Previous message: Herfried K. Wagner [MVP]: "Re: "'convert' is not a member of string""
- In reply to: Jorge Serrano [MVP VB]: "RE: Newbee question on regular expressions"
- Next in thread: vvenk: "RE: Newbee question on regular expressions"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 10 Nov 2004 05:31:04 -0800
Jorge:
Thanks for your help. Can you clarify the following questions?
1. I understand the use of "|"; it's an "or". I see that you are saying
"(any alpha or number)" or "+" or "-". I don't understand "\(_)". Why can't I
say \_. What is the significance of the open and close paranthesis?
2. Also, this does not seem to enforce Rule 1 concering the minimum and the
maximum length.
Thanks.
Venkat
"Jorge Serrano [MVP VB]" wrote:
> Hi wenk,
>
> try the next regular expression:
> ^([a-zA-Z0-9|\+|\-\(_)]{3,20})$
>
> (test it first please)
>
> I hope that helps.
>
> Kind Regards,
>
> Jorge Serrano
> MVP VB.NET
>
>
> "vvenk" wrote:
>
> > Hello:
> >
> > I am trying to learn about regular expressions.
> >
> > How would I use regular expressions to ensure that the password an user
> > enters conforms to the following rules:
> >
> > 1. It has to be between 3-20 characters long.
> > 2. Only a-z, A-Z, 0-9, +-_ are allowed.
> > 3. At least one occurence of a lower case letter, a upper case letter and a
> > digit has to be used.
> >
> > Any help will be appreciated.
- Next message: Mohamoss: "RE: MessageBox question"
- Previous message: Herfried K. Wagner [MVP]: "Re: "'convert' is not a member of string""
- In reply to: Jorge Serrano [MVP VB]: "RE: Newbee question on regular expressions"
- Next in thread: vvenk: "RE: Newbee question on regular expressions"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|