You find this example project in your Plugins Download as a Xojo project file within the examples folder: /RegEx/RegEx/RegEx Multiline
Class Window1 Inherits Window
Control EditField1 Inherits TextArea
ControlInstance EditField1 Inherits TextArea
End Control
Control PushButton1 Inherits PushButton
ControlInstance PushButton1 Inherits PushButton
EventHandler Sub Open()
dim r as RegExMBS
dim n,i,c as integer
dim s as string
s=ReplaceLineEndings(EditField1.text,EndOfLine.UNIX)
r=new RegExMBS
'r.CompileOptionFirstLine=True
r.CompileOptionMultiline=True
if r.Compile("^....$") then
n=0
do
c=r.Execute(s,n)
if c>0 then
MsgBox r.Substring(0)
n=r.Offset(1)
end if
loop until c=0
end if
End EventHandler
End Control
End Class
MenuBar MenuBar1
MenuItem UntitledMenu1 = ""
MenuItem FileMenu = "&File"
MenuItem FileQuit = "Quit"
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem UntitledMenu0 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "Clear"
End MenuBar
Class App Inherits Application
End Class