I'm trying to write a "suggestion search box" and I cannot find a solution that allows to highlight a substring with javascript keeping the original case.
For example if I search for ...
I am doing one project for tat i want to search and highlight text the words i can able to search the words and multiple words through regular expression.my code is
I am currently working on some syntax highlighting in Javascript.
To match strings, I would use something like this: code = code.replace(/("([^"\\]*(\\.[^"\\]*)*)")/gm, "<span class=\"string\">$1</span>"); // string
This would match an integer: code = code.replace(/(\d+)/gm, "<span ...
I'm creating an auto complete and I'm having a little problem the results highlighting. You see my searching algorithm is very generous and ignores apostrophes in the result so therefore a ...