Improved regexes.
Bumped version to v0.4
Merge branch 'release-0.4' into develop