SearchInBuf (hbuf, pattern, lnStart, ichStart, fMatchCase, fRegExp, fWholeWordsOnly)

Searches for pattern in the buffer hbuf. The search starts at line number lnStart and character index ichFirst. SearchInBuf returns a Sel record which spans the matching text. If nothing is found, then an empty string is returned. See GetWndSel for a description of the Sel record.

If fMatchCase, then the search is case sensitive.

If fRegExpr, then the pattern contains a regular expression. Otherwise, the pattern is a simple string.

If fWholeWordsOnly then only whole words will cause a match.