Parse line-by-line since regex multiline support is missing in most environments.
See: http://cplusplus.github.io/LWG/lwg-active.html#2343