LANCommander/LANCommander/Snippets/Examples/Replace Content In File.ps1
2023-01-26 20:42:33 -06:00

2 lines
No EOL
233 B
PowerShell

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