To hopefully better explain the problem, I use a regular expression to do a search for all matches in the document's text. When I go through all of the matches, if there's a field preceding the match, the FirstIndex value doesn't match the position of the found text in the document's range.
e.g. if the first found match is at 168 in the text, if there's a field before position 168, then the match might be at position 228 in the document.
|