View Single Post
Old 06-15-2008   #3 (permalink)
/\\/\\o\\/\\/


 
 

Re: match against array

you can also use the Contains operator

$group = "Jane","John","David"
get-user | where-object {$group -contains $_.name}

Greetings /\/\o\/\/

"Reed Wiedower" <rwiedower@xxxxxx> wrote in message
news:%23prIqcYzIHA.4168@xxxxxx
Quote:

>I knew I should've walked over to my RegEx book!
>
> Thanks.
>
> end of line,
>
> Reed
>
> Kiron wrote:
Quote:

>> # use RegEx's alternation operator '|'
>> get-user | where-object {$_.name -match "Jane|John|David"}
>>
>> --
>> Kiron
>
My System SpecsSystem Spec