André Portugal
André Portugal

Reputation: 15

Double search pattern on vb

I'm using an array of directories, and a search pattern. Like this

Dim dirs As String() = Directory.GetDirectories(folderBrowserDialog1.SelectedPath, "ABC*")

If I want to search for folders names that start with "ABC" and end with "123" for instance.

How do I include that on the same search pattern, is it possible?

Upvotes: 0

Views: 65

Answers (2)

Ctznkane525
Ctznkane525

Reputation: 7465

I believe this is what you are looking for:

Dim dirs As String() = Directory.GetDirectories(folderBrowserDialog1.SelectedPath, "ABC*123")

Upvotes: 2

Scath
Scath

Reputation: 3824

I think this will work.

Dim dirs As String() = Directory.GetDirectories(folderBrowserDialog1.SelectedPath, "ABC*123")

Upvotes: 2

Related Questions