Regex improvements and readability