Method RegEx():setMultiline() Foundation

Sets multiline mode for anchors.

Syntax
:setMultiline( [<lMulti>] ) --> self
Parameters
<lMulti>
Set to .T. (true) to enable multiline mode. A value of .F. (false) disables the feature. Defaults to .T.
Return

This method returns self.

Description

In multiline mode, ^ and $ anchors match at line boundaries within the string, not just at the start and end of the entire string.

Set multiline mode

oRegEx := RegEx():create("^ERROR"):setMultiline() 
? oRegEx:test("Line1" + Chr(10) + "ERROR: Failed")  // .T. 
oRegEx:destroy() 

Feedback

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.