Home All Groups Group Topic Archive Search About

Regular expression ??

Author
16 Apr 2005 11:50 PM
Just Me
Given a string variable fileName
And a pattern *.txt  or  *.*  or    File?.exe


Is there a simple way to determine if fileName satisfies the pattern?


Thanks in advance

Author
17 Apr 2005 12:11 AM
Herfried K. Wagner [MVP]
" Just Me" <gro***@a-znet.com> schrieb:
> Given a string variable fileName
> And a pattern *.txt  or  *.*  or    File?.exe
>
>
> Is there a simple way to determine if fileName satisfies the pattern?

\\\
If FileName Like "*.txt" Then
    ...
End If
///

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>