Selects named capture group values as note properties from Select-String MatchInfo objects.
Select-CapturesFromMatches.ps1 [[-MatchInfo] <MatchInfo>] [-ValuesOnly] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
.*?\b)\s*(?<Email>\S+@\S+)$' addrbook.txt |Select-CapturesFromMatches.ps1
Name Email —- —– Arthur Dent adent@example.org Tricia McMillan trillian@example.com
The MatchInfo output from Select-String to select named capture group values from.
Type: MatchInfo
Parameter Sets: (All)
Aliases: InputObject
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Return the capture group values without building objects.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.