I have a piece of code that searches through a table looking for a certain phrase. Once it finds the phrase, it returns the innerHTML of the current cell to a div near the top o
As you are just wanting to check for presence of a specific string, I think your solution will probably be more robust if you use indexOf rather than RegExps.
Using RegExps, if you are looking for special characters eg [
or ]
or (
or )
then you will need to escape them, this is just another layer of complexity which I don't think you need to introduce.
So try replacing regex usages such as...
if (currentRow.innerHTML.match(map_regex))
with this...
if (currentRow.innerHTML.indexOf(mapString)!=-1)