I'm not sure why this regex does not work, what I'm trying to achieve is given the text "user's desktop" I need to convert it to "user\'s desktop".
This is my attempt:
String descrip = "user's desktop";
descrip = descrip.replaceAll("'", "\\'");
But the apostrophe is not replaced. What am I doing wrong?