tdubb123
Expert
Expert

-match "^a[p,d]\w*

Any idea what this pattern matches?

0 Kudos
1 Reply
LucD
Leadership
Leadership

Start at the beginning of the string.
Match the character 'a' literaly.
Match one of the characters 'p' or 'd'.
Match a "word" character between zero and unlimited times, as many times as possible.
For what falls under "word" characters see Word character: \w



Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference