|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to do the pattern?Hello,
I want to get the strings that match c*.txt ( * means asterisk wildcard) from some strings below: c1234.txt 1234.txt a1234.exe cqwer.txt casd.txt I want to use regular or function, do not want to use if....then... How to do? Thank you "yxq" <ga***@163.net> schrieb: Check out the documentation of VB's 'Like' operator.> I want to get the strings that match c*.txt ( * means asterisk wildcard) > from some strings below: > > c1234.txt > 1234.txt > a1234.exe > cqwer.txt > casd.txt > > I want to use regular or function, do not want to use if....then... -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> "regular expressions" are another technique to be aware of. in this case
the regular expression is "^c". Get this tool and play with it. It will even generate the code for doing evaluating a regular expression for you. http://www.sellsbrothers.com/tools/#regexd Show quoteHide quote "yxq" <ga***@163.net> wrote in message news:eH9K9E0SGHA.5736@TK2MSFTNGP10.phx.gbl... > Hello, > I want to get the strings that match c*.txt ( * means asterisk wildcard) > from some strings below: > > c1234.txt > 1234.txt > a1234.exe > cqwer.txt > casd.txt > > I want to use regular or function, do not want to use if....then... > How to do? > > Thank you > > > |
|||||||||||||||||||||||