I find powershell in some ways, can do regexes to a limited extent. No doubt it can do more but I can't see why it isn't here. I'm trying to use a regex to specify files/directories.
For example, when I have a directory called 'qwe' this will show it
PS C:\Users\bob\a> Get-ChildItem C:\Users\bob\a\[qwe][qwe][qwe]
d---- 24/08/2014 1:28 PM qwe
But I can't do
PS C:\Users\bob\a> Get-ChildItem C:\Users\bob\a\q.e
(to pick up the qwe directory)
And if I do
PS C:\Users\bob\a> Get-ChildItem C:\Users\bob\a\..
Then it goes back a directory and there's no way I can find to make it match a file/dir of 2+ characters or even 2 characters, with the regex ..
However, it does support this aspect of regular expressions [abcd] (a character class to match an 'a' or 'b' or 'c' or 'd') or [a-z] though it is somewhat unregex like as [abcd] only matches where the result is one character. With a proper regex it'd normally match anything with that character including when there's more than that character there.
[qwe]
are not regular expressions. This is part of globbing syntax (though results are same as in regular expressions). In globbing a way to specify 'any single character' is?
. Try:Get-ChildItem c:\users\bob\a\q?e
(en.wikipedia.org/wiki/Glob_(programming))