I have this line which does what its supposed to do:
Get-Content $OutFax\$newName |ForEach-Object {$_ -replace "a", "b" }| Set-Content $OutFax\$txtName
Opens a file and replaces a with b. But in the real world a is:
<ToFaxNum:11111111>
I would like to replace that with
::11111111
The ::11111111 could be any number between 1 and 9 and from 8 to 15 numbers. After ToFaxNum:11111111 there is a new line.
I have not tried anything because i have absolutely no idea how to solve it. I dont understand regex.
Thank you.
ToFaxNum(:\d{8,15})see demo regex101.com/r/kY6gR2/3<ToFaxNum(:\d{8,15})>. See the new demo regex101.com/r/kY6gR2/4