![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | BUG in [Management.Automation.WildcardPattern]::Escape()? Just a silly test: 0> $e = '[`*?]' 0> $escaped = [Management.Automation.WildcardPattern]::Escape($e) 0> $escaped `[``*`?`] Remarks: backtick itself is not escaped, it looks suspicious (I used to think that escaping character has to be always escaped itself); or even worse: backtick is escaped but * is not.. > 0> $e -like $escaped True This is ok, because $escaped actually represents $e. And $e should be the only string represented by $escaped (case sensitivity does not matter in this case). But: 0> '[`xxx?]' -like $escaped True 0> '[`xxxx?]' -like $escaped True 0> '[`xxxxx?]' -like $escaped True P.S. all mentioned characters are valid for example for key or value names of Registry provider. BTW, currently Rename-Item has no -LiteralPath parameter (overlook?), so there are cases when we just have to use [Management.Automation.WildcardPattern]::Escape() (or something else for now). -- Thanks, Roman |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| RC2 - where has System.Management.Automation.dll gone? | =?Utf-8?B?QW5kcmV3IFdlYmI=?= | PowerShell | 5 | 01-10-2008 12:43 AM |
| Re: System.Management.Automation.dll missing? | Oisin Grehan | PowerShell | 2 | 11-25-2007 09:14 PM |
| Where can I find System.management.automation.resources.dll | Joe G | PowerShell | 8 | 09-06-2007 12:34 PM |
| -is [System.Management.Automation.PSCustomObject] | Doug | PowerShell | 3 | 04-04-2007 06:36 PM |
| Getting Exception System.Management.Automation.PSArgumentException | Sushil Kumar | PowerShell | 0 | 11-14-2006 08:06 AM |