Removed usage of regex, because GCC doesn't support regex (even though it claims to). Now using handrolled version line parsing.