Actions
Bug #11132
closedString#sub and character sequence \' in replacement string
Bug #11132:
String#sub and character sequence \' in replacement string
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]
Backport:
Description
Hi,
I don't know if this is intentional but substitution of \' and \` in the replacement string was rather unexpected for me:
I would have expected the following result:
The documentation says nothing about this, just that back-references can be used (i.e. \\d or \\k<n>).
A work-around is escaping the escape character:
Thanks!
Actions