I have a number of files, each with a number of lines of plain text in them and I'd like to insert a space between certain "words".
I have no problem looping the files, or replacing some text with different text, but not sure how to keep the existing text when I do so!
$ln = "20142301 Starting_LOC1SVR14"
$newln = $ln -replace "_", " "
$newln = $newln -replace "LOC[0-9]","????"
Given this sample, I want to insert the space between LOC1 and SVR14 to give LOC1 SVR14
Note that the LOC goes up to 16, but I can write the regex for 1 or more numerals, it's keeping that LOC1 part thats giving me the headache!
20142301 Starting_\0 SVR14?