Use MULTILINE regexp searches

Fixes #257