How can I use a closing square bracket as a character in a javascript regular expression?
"Acb[".match('[\(, \), \[]')
returns:
["["]
But when I add the closing square bracket as a character it does not work :
"Acb[".match('[\(, \), \[, \]]')
null
"Acb]".match('[\(, \), \[, \]]')
null
Aucun commentaire :
Enregistrer un commentaire