DIAdem Help

Property: Multiline for RegExp

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

Property: Multiline for RegExp

Specifies, whether the search for the text pattern refers to all lines of the character string. If you assign FALSE to the Multiline property, the search only refers to the first line of the character string.

Object.Multiline
ObjectRegExp
Object with this property
Object.MultilineBoolean with read and write access

The following example replaces all special characters of a given character string with the "~" character.

Function DelSpecChar(sText)
  Dim RegExpression
  Set RegExpression = CreateObject("VBScript.RegExp") 
  RegExpression.IgnoreCase = True 
  RegExpression.Global = True 
  RegExpression.Multiline = True 
  RegExpression.Pattern = "[^0-9a-zA-Z]" 
  DelSpecChar = RegExpression.Replace(sText,"~") 
End Function