Replace regex match with NewlineCheck for more tolerative builds

- Fixes #2