LANCommander/LANCommander.Server/Snippets/Functions/Write-ReplaceContentInFile.ps1

2 lines
249 B
PowerShell
Raw Permalink Normal View History

2023-11-17 00:46:05 -06:00
# Use regex to replace text within a file. Quotes are escaped by double quoting ("")
2023-11-30 19:46:04 -06:00
Write-ReplaceContentInFile -Pattern '^game.setPlayerName "(.+)"' -Substitution "game.setPlayerName ""$NewPlayerAlias""" -FilePath "$InstallDirectory\<File Path>"