I have a regular expression te surround matching words with a span for highlighting the word. It works great only doesn’t returns matches which starts with a capital… do you know how to change the regular expression to also match words which starts with a capital?
Here is part of JS.
answer_match.innerHTML.replace(new RegExp('(\b)(\w*' + q + '\w*)(\b)', 'ig'), "<span class='match'>$&</span>");
q is the variable word.
Thanks in advance!