Previous Topic

Next Topic

MatchRegEx - MaxBasic Function

MatchRegEx(InputString: String, RegularExpression: String): Boolean

Returns a Boolean indicating whether regular expression matches string.

MatchRegEx function syntax has these named arguments:

Parameter

Description

InputString

Required. The String to be matched.

RegularExpression

Required. The string containing the regular expression.

Sample code:

Dim Matched as Boolean

Matched = MatchRegEx("Hello World", "^[A-Za-z ]+$")

Msgbox(Matched)

Note: For details of the Regular Expression syntax see Regular expressions (RegEx)

See Also

String Functions

Book Contents

Book Index