Sublime Forum

Find Regex Bug

#1

In Python, regex searching for ’ is identical to regex searching for '.
In Sublime Text 2, regexg searching for ’ finds nothing, whereas regex searching for ’ finds all single-quotes.
This appears to be a problem for ', <, >, and ` (single quote, less than, greater than, and backtick), but for no other characters.
The problem comes up because re.escape puts a backslash in front of all non-alphanumeric characters, which breaks strings that have one of these four trouble characters in them.
Thanks to tito for finding this!

0 Likes