LANCommander/LANCommander.Server/Snippets/Functions/Write-ReplaceContentInFile.ps1
2024-08-04 18:44:33 -05:00

2 lines
No EOL
249 B
PowerShell

# Use regex to replace text within a file. Quotes are escaped by double quoting ("")
Write-ReplaceContentInFile -Pattern '^game.setPlayerName "(.+)"' -Substitution "game.setPlayerName ""$NewPlayerAlias""" -FilePath "$InstallDirectory\<File Path>"