Improve matching in nodeIndexToCharIndex w regex

Otherwise we can get false positives. e.g. <li> vs <link>