MatchRegularExpression()

Syntax

Result = MatchRegularExpression(#RegularExpression, String$)
Description
Test the string against the #RegularExpression. 'Result' is will be 1 if there is one or more matches, or 0 if no pattern is found.

Example:
  ; This expression will match every word of 3 letter which begin by a lower case letter,
  ; followed with the character 'b' and which ends with an uppercase letter. ex: abC
  ;    
  If CreateRegularExpression(0, "[a-z]b[A-Z]")
    If MatchRegularExpression(0, "abC ABc zbA abc")
      Debug "The string match !"
    Else
      Debug "No pattern found in the string"
    EndIf
  Else
    Debug RegularExpressionError()
  EndIf

Supported OS

All

<- IsRegularExpression() - RegularExpression Index - RegularExpressionError() ->