Powershell regex might be disturbing because of multiple way to deal with escape characters :
So as you nested your string beetween simple quote :
- Groups can be marked with bracket or not : (.n) or .n
- Double quotes can be considered as standard characters
- Brackets can be considered as standard characters
If you nested your string beetween double quote, the double quote inside the string must be escape with standard powershell escape character : `"
So all following examples return the same result
$pattern = 'AssemblyCopyright("what ever in there")]'
# standard regex
$pattern -replace 'AssemblyCopyright\(\"(.*)\"\)\]', 'AssemblyCopyright("new pattern")]'
# no quote escape
$pattern -replace 'AssemblyCopyright\("(.*)"\)\]', 'AssemblyCopyright("new pattern")]'
# no brackets escape
$pattern -replace 'AssemblyCopyright\("(.*)"\)]', 'AssemblyCopyright("new pattern")]'
# no parenthesis to define group
$pattern -replace 'AssemblyCopyright\(".*"\)]', 'AssemblyCopyright("new pattern")]'
# double quote instead of simple quote
$pattern -replace "AssemblyCopyright\(`".*`"\)]", "AssemblyCopyright(`"new pattern`")]"