I am trying to replace in several files the following type of string:
StringResourceHelper.[STRING_OF_INTEREST]ResourceString() with Strings.[STRING_OF_INTEREST]
For example I would like to replace:
StringResourceHelper.HelpResourceString() with Strings.Help
So far, I got a simple replacement which would work if the second string would not be important:
Get-ChildItem . *.cs -Recurse |
Foreach-Object {
$c = ($_ | Get-Content)
$c = $c -replace 'StringResourceHelper.','Strings.'
$c | Set-Content $_.FullName -Encoding UTF8
}
But this does not help me, because I also have Strings like StringResourceHelper.Culture which should not be touched.
Any help is appreciated.