Home All Groups Group Topic Archive Search About

LIKE operator question

Author
17 Jan 2006 8:45 PM
PJ6
LIKE is a noise word so I'm having trouble finding/googling information on
it.

The help in VS.NET was less than useful explaining this little quirk...

? "test.test.test" like "*.*"
True
? "test.test.test" like "*.*.*"
False

Is this expected behavior?

Paul

Author
17 Jan 2006 9:31 PM
cbrown
Seems odd, what is the end result your are going for?
Author
17 Jan 2006 10:00 PM
Herfried K. Wagner [MVP]
"PJ6" <nob***@nowhere.net> schrieb:
> The help in VS.NET was less than useful explaining this little quirk...
>
> ? "test.test.test" like "*.*"
> True
> ? "test.test.test" like "*.*.*"
> False
>
> Is this expected behavior?

There have been bugs with 'Like' pattern matchin in VB 7.*, for example
<URL:http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=b8606152-01a5-4ef7-aefc-aa07b2d5c11f>.
Which version of VB.NET are you using?  '"test.test.test" Like "*[.]*[.]*"
works fine in VB.NET 7.1, so I think the behavior for "*.*.*" is a bug.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
18 Jan 2006 12:00 AM
Herfried K. Wagner [MVP]
Addendum:

It's definitely a bug in VB 7.* that has fortunately been fixed in VB 2005!

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
17 Jan 2006 11:30 PM
Homer J Simpson
"PJ6" <nob***@nowhere.net> wrote in message
news:%23L37rb6GGHA.2472@TK2MSFTNGP10.phx.gbl...
> LIKE is a noise word so I'm having trouble finding/googling information on
> it.
>
> The help in VS.NET was less than useful explaining this little quirk...
>
> ? "test.test.test" like "*.*"
> True
> ? "test.test.test" like "*.*.*"
> False
>
> Is this expected behavior?

Try

? "test.test.test" like "*\.*\.*"