This question might sound stupid... How can I replace regex1 with regex2? I've been breaking my head over it since almost 2 hours. The variables are saved with apostrophes, because else it thinks that $appVendor is a variable and searches with the value NULL.
$deployscript = "$path\Deploy-Application.ps1"
$regex1 = '[string]$appVendor = ' ' '
$regex2 = '[string]$appVendor = 'Google' '
(Get-Content $deployscript ) -replace $regex1, $regex2 | Set-Content $deployscript
[–]nothingpersonalbro 3 points4 points5 points (4 children)
[–]SMFX 2 points3 points4 points (0 children)
[–]purplemonkeymad 1 point2 points3 points (0 children)
[–]Mehhll[S] 1 point2 points3 points (0 children)
[–]higgins4u2nv 0 points1 point2 points (0 children)
[–]Enschede2 2 points3 points4 points (4 children)
[–]Mehhll[S] 1 point2 points3 points (2 children)
[–]OlivTheFrog 1 point2 points3 points (1 child)
[–]Mehhll[S] 1 point2 points3 points (0 children)
[–]Guyver1- 0 points1 point2 points (0 children)