I'm trying to edit a file with powershell, the thing is that I need all the information between two strings, this is currently what I have
$testText = Get-Content C:\Users\Administrator\Documents\test1\test1.txt
$pattern = '(?<=\DocMasterBOL>).+?(?=\DocFWImport>)'
[regex]::Matches($testText, $pattern).Value
where "DocMasterBOL>" is the beginningof the string and "DocFWImport>" the end of it
Do somebody knows how to do the same but adding the last part of the string? At the moment is adding results as I need them but without the end of the string "DocFWImport>"