Switch -Regex in Powershell.
Posted
by CrazyNick
on Server Fault
See other posts from Server Fault
or by CrazyNick
Published on 2010-03-27T09:03:24Z
Indexed on
2010/03/27
9:13 UTC
Read the original article
Hit count: 377
$source |% {
switch -regex ($_){
'\<'+$primaryKey+'>(.+)\' {
$primaryKeyValue = $matches[1]; continue; }
} I want to use dynamic key value with switch-regex, is that possible?
© Server Fault or respective owner