Simplify regular expression and actually make it work.