in reply to matching first paragraph satisfying condition

Thank you, 1nickt and jwkrahn, for your lovely solutions to the problem! I also appreciate that your one-liners interpret "indented" as any whitespace at the start of the line, not just spaces. Incidentally, I didn't mention some of my other failed attempts, such as perl -0pe 's/pattern1|pattern2/$1/gs'; apparently the "or" operator doesn't work as expected here.

Best regards,