Fleshed out a bit of the regexp parsing.