Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jongalloway/1b607ebd82704e1f21e0 to your computer and use it in GitHub Desktop.
Save jongalloway/1b607ebd82704e1f21e0 to your computer and use it in GitHub Desktop.
$find = '<a (name|id)="(\w*)" />'
$replace = '<a $1="$2"></a>'
$match = 'README.md'
gci -r -i $match | % {
(gc $_ ) | % { $_ -replace $find, $replace } | sc $_
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment