This might be very simple. I just want to match all strings within strings, including new line breaks. Example:
textfile:
MESSAGE BEGIN
mary had a little lamb.
little lamb
MESSAGE END
output expectation:
mary had a little lamb.
little lamb
Here is what i currently have. it works okay, except everything is in 1 line.
Code (I currently have):
$pattern= Regex::"MESSAGE BEGIN(.*?)MESSAGE END"
[regex]::Match($text,$pattern).Groups[1].Value
result:
mary had a little lamb.little lamb
I would like it to respect line breaks, so that they are not all crammed together.