hai fatto male l'escape
add=add.replaceAll("\\'","'");
dovrebbe andare