supprimer le mot de la chaîne javascript
var str = "delete-this"
str.replace('delete-','') // str = "this"
Foolish Flatworm
var str = "delete-this"
str.replace('delete-','') // str = "this"
string2 = "I love you 我爱你"
englishChars = string2.replace(/[^a-z ]/ig, "").trim().split(/\s+/);
nonEnglishChars = string2.replace(/[a-z ]/ig, "").split(/[ ]*/);
final = englishChars.concat(nonEnglishChars);
console.log(final);