From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Class (inherits from Object)

Used to specify options when doing a search using regular expressions.

CaseSensitive LineEndType StringBeginIsLineBegin
DotMatchAll MatchEmpty StringEndIsLineEnd
Greedy ReplaceAllMatches TreatTargetAsOneLIne


Normally, RegEx searches are case insensitive. This example does a case-sensitive search using by supplying the a RegExOptions instance with CaseSensitive = True:

Var re As New RegEx
Var match As RegExMatch

Var ro As New RegExOptions
ro.CaseSensitive = True

re.Options = ro
re.SearchPattern = "software"
match = re.Search("How much software can a Software Developer make?")

Var result As String
If match <> Nil Then
result = match.SubExpressionString(0)
End If

match = re.Search
Loop Until match Is Nil

See Also

RegEx, RegExMatch classes.