Regex improvements