- Removed unnecessary code from the Regex canonicalization function.