Regex fixes and small changes.

Signed-off-by: Daniel Josefsson <dannejosefsson@gmail.com>
Tests and readme.

Signed-off-by: Daniel Josefsson <dannejosefsson@gmail.com>