Fixes #212 - replacing r/ is bad practise

Replacing r/ can and will match comment strings and isn't as strict/safe
as /r/. Perhaps when adding shortcuts we should have a full regex match
so we can reject incorrect shortcuts? However, this fixes #212 and makes
this but if script more robust.
Merge pull request #252 from patricksnape/issue_212

Fixes #212 - replacing r/ is bad practise