Re: Regular expressions
- From: "Cloe" <info@xxxxxxxxxxxxxxxxx>
- Date: Tue, 26 Apr 2005 09:22:05 +0200
AHHHHHHHHHHHHHHHHH
Just learned something new today :)
Thank you Rick
Guy
"Rick Rothstein" <rickNOSPAMnews@xxxxxxxxxxxxxxxxx> wrote in message
news:O2FSbYiSFHA.1096@xxxxxxxxxxxxxxxxxxxxxxx
>> Can someone please show how to use Regular expressions to
>> validate that the input string is composed only from a-z and 0-9 ?
>
> Are you using VB6 or lower? If so, you don't need to use Regular
> Expressions... you can use the Like operator.
>
> If Not YourTextString Like "*[!a-z0-9]*" Then
> '
> ' Your text is composed only of
> ' lower case letters and digits.
> '
> End If
>
> If you want upper case letters too, then change the IF statement to this
>
> If Not YourTextString Like "*[!a-zA-Z0-9]*" Then
>
> On the other hand, if you are using a version of VB.NET, then consider
> this...
>
> Almost everybody in this newsgroup is using VB6 or lower. While you may
> get a stray answer to VB.NET (including VB2003 and VB2005 which has
> dropped .NET from its name) questions here, you should ask them in
> newsgroups devoted exclusively to .NET programming. Look for newsgroups
> with either the word "dotnet" or "vsnet" in their name.
>
> For the microsoft news server, try these newsgroups for Visual Basic
> .NET related questions...
>
> microsoft.public.dotnet.languages.vb
> microsoft.public.dotnet.languages.vb.upgrade
> microsoft.public.dotnet.languages.vb.controls
> microsoft.public.dotnet.languages.vb.data
>
> And these for more general .NET questions
>
> microsoft.public.dotnet.general
> microsoft.public.vsnet.general
>
> Note: There are many other .NET newgroups (use the first three "fields"
> from the last two as templates when searching for them), but the above
> ones should get you started.
>
> Rick - MVP
>
.
- Follow-Ups:
- Re: Regular expressions
- From: Veign
- Re: Regular expressions
- References:
- Regular expressions
- From: Cloe
- Re: Regular expressions
- From: Rick Rothstein
- Regular expressions
- Prev by Date: Regular expressions
- Next by Date: Re: FileExists
- Previous by thread: Re: Regular expressions
- Next by thread: Re: Regular expressions
- Index(es):
Relevant Pages
|