Updates text found with Select-String, using a regular expression replacement template.
Set-RegexReplace.ps1 [-Replacement] <String> [-InputObject <MatchInfo>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
)' README.md |Set-RegexReplace.ps1 "`$1 $(Get-Date) `$2"
Updates the generated date in README.md.
\d+</td>)' |Set-RegexReplace.ps1 '$1 align="right"$2'
<table> <colgroup><col/><col/></colgroup> <tr><th>Name</th><th>Length</th></tr> <tr><td>README.md</td><td align=”right”>21099</td></tr> </table>
A regular expression replacement string.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The output from Select-String.
Type: MatchInfo
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
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.
https://docs.microsoft.com/dotnet/standard/base-types/substitutions-in-regular-expressions