What steps will reproduce the problem?
Try use .replace() to string which contains ? or $.
What is the expected output? What do you see instead?
Expected output:
>>> "$XE$".replace("$XE$", "!")
!
>>> "?XE".replace("?", "!")
'!XE'
and so on.
What do you see instead?
>>> "$XE$".replace("$XE$", "!") # replace doesn't work at all
$XE$
>>> "XE".replace("XE", "!") # this is OK
!
>>> "$XE".replace("$XE", "!") # but this is not
$XE
>>> "XE$".replace("XE$", "!")
XE$
>>> "XE$".replace("$", "!") # this is really weird
XE$!
>>> "$XE".replace("$", "!") # this even weirder
$XE!
>>> "?XE".replace("?", "!") # doesn't work at all
Exception!
>>> "XE?".replace("?", "!")
Exception!
>>> "XE!".replace("!", "?") # this works correctly
XE?
What version of the product are you using? On what operating system?
Version 1.0.20130126-094636
Original issue reported on code.google.com by bystrousak@kitakitsune.org on 27 Jan 2013 at 1:34
Original issue reported on code.google.com by
bystrousak@kitakitsune.org
on 27 Jan 2013 at 1:34