Method RegEx():find() Foundation
Finds the first match position.
:find( <cSubject>, [<nStartPos>] ) --> nStartPosition
The starting position of the match or 0 if no match is found.
Locates the first occurrence of the pattern in the subject string and returns its starting position. This method is useful when only the position is needed without the matched text.
Find
oRegEx := RegEx():create("ERROR")
nPos := oRegEx:find("System ERROR at line 42")
? nPos // 8
oRegEx:destroy()
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.