I need to use RegEx to find one string and replace it with a string in the following line.
Before:
SBRP18REMA~
NM1IL1DOEJANEAMI124111111800~
N3PO BOX 56~
After:
SBRP124111111800REMA~
NM1IL1DOEJANEAMI124111111800~
N3PO BOX 56~
$configFiles = Get-ChildItem -path "C:\test2\" *.DAT foreach ($file in $configFiles) { (Get-Content $file.PSPath) | Foreach-Object { $_ -replace "SBR\*P\*?*","SBR\*P\*124111111800~} | set-Content $file.PSPath
I realize my RexEx is not even close.
thanks,
Kevin