我的字符串就像(乘客的名字是 Suraj,乘客的联系电话是XXXXXXX672)。如何从字符串中删除出现的 ' ?我尝试使用
XXXXXXX672
comments = comments.replace(/'/g, ' '); and comments = comments.replace(/\'/g, ' ');
但他们没有工作。请建议我有需要的。
javascript string
javascript ×1
string ×1