Answer the question
In order to leave comments, you need to log in
Why doesn't this regular expression work in javascript?
var message = "!test vk.com/123";
var re = /^!test (\[\S+?\|@|\[\S+?\|\*|(https:\/\/|)vk.com\/)\S+$/i;
var search = message.replace(re, "");
search.replace(/[\[\]\*@]/g, "");
console.log(search); // пустая строка
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question