Better regex, improved naming of variables.