Implement Regex.escape