use Parsec instead of Regex, much better code