Suppose I have a list formed by words including special characters:
one
<two></two>
three#
$four
etc.
I want to find all words in the list that contain specific letters,
I've tried to use
var myList = "<one></one> $two three#";
var myRegex = /\bMYWORD[^\b]*?\b/gi;
alert(myList.match(myRegex));
But this does not work with special characters..
Unfortunately I'm new to javascript, and I don't know what is the best way to create the list
and to separe the words in the list..