ReplaceRegularExpression()

Syntax

Result$ = ReplaceRegularExpression(#RegularExpression, String$, ReplaceString$)
Description
Replace some strings according to the #RegularExpression. Each pattern matching the regular expression will be replaced with 'ReplaceString$'.

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]")
    Result$ = ReplaceRegularExpression(0, "abC ABc zbA abc", "---")
    Debug Result$ ; Will print "--- ABc --- abc"
  Else
    Debug RegularExpressionError()
  EndIf

Supported OS

All

<- RegularExpressionError() - RegularExpression Index