Reuse pattern.
Join lines before extracting parts.
Do not add trailing whitespace.
Remove trailing whitespace from tests.
Use colon before pattern in multiline test.