La copie de code est la suivante: $ (function () { var str = "Sunny, woo"; var seer = new regexp (','); if (sear.test (str)) { alert ('oui'); } var tag = ','; if (str.indexof (tag)! = - 1) { alert ('oui'); } });