DIAdem Help

Property: Pattern for RegExp

  • Updated2024-09-12
  • 1 minute(s) read

Property: Pattern for RegExp

Specifies the text pattern of a regular expression.

Object.Pattern
ObjectRegExp
Object with this property
Object.PatternString with read and write access

The following example specifies the text pattern bc and replaces it in the entire character string:

Dim RegExpression, sText
Set RegExpression = CreateObject("VBScript.RegExp")
RegExpression.Pattern = "bc"
RegExpression.Global = TRUE
RegExpression.IgnoreCase = TRUE
sText = RegExpression.Replace("abcABC","bcdef")
Call MsgBox(sText) ' Returns abcdefAbcdef

Log in to get a better experience