RegExOptions

From Xojo Documentation
Jump to: navigation, search

Class (inherits from Object)

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

Properties
CaseSensitive LineEndType StringBeginIsLineBegin
DotMatchAll MatchEmpty StringEndIsLineEnd
Greedy ReplaceAllMatches TreatTargetAsOneLIne

Example

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

Dim re As New RegEx
Dim match As RegExMatch

Dim ro As New RegExOptions
ro.CaseSensitive = True

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

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

match = re.Search
Loop Until match Is Nil

See Also

RegEx, RegExMatch classes.

Personal tools
Namespaces

Variants
Actions
Main
Content
Starting Out
Dig Deeper
More Help
Toolbox
About