Sideway BICK BlogSideway BICK BLOG from Sideway

A Sideway to Sideway Home

Link:http://output.to/sideway/default.asp?qno=180500021

Script, Scripting Language, VBScript elements, Server-Side VBScript Object Element RegExp Match Property

VBScript Properties of RegExp Match Object

Some typical predefined Elements are.

  •  RegExp Object:
    • Global Property
    • IgnoreCase Property
    • Pattern Property
    • Execute Method
      • Count Property

FirstIndex Property

last updated 12/11/2017

is to return the position in a search string where a match of associated Match Object occurs.

Syntax

Set rematvar=reobjvar.Execute(string).Item(key)
rematvar.FirstIndex

Remarks

  • The FirstIndex property uses a zero-based offset from the beginning of the search string. In other words, the first character in the string is identified as character zero (0).

Requirement

5

Applied to

RegExp Object, Match Object

Length Property

last updated 12/11/2017

is to return the length of a match of associated Match Object found in a search string.

Syntax

Set rematvar=reobjvar.Execute(string).Item(key)
rematvar.Length

Requirement

5

Applied to

RegExp Object, Match Object

Value Property

last updated 12/11/2017

is to return the value or text of a match of associated Match Object found in a search string.

Syntax

Set rematvar=reobjvar.Execute(string).Item(key)
rematvar.Value

Requirement

5

Applied to

RegExp Object, Match Object

SubMatches Property

last updated 12/11/2017

is to return all submatches of associated Match Object in form of SubMatches Object, called SubMatches Collection..

Syntax

Set rematvar=reobjvar.Execute(string).Item(key)
rematvar.SubMatches

Remarks

  • A SubMatches collection contains individual submatch strings, and can be created only by using the Execute method of the RegExp object. The SubMatches collection's properties are read-only.
  • When a regular expression is executed, zero or more submatches can result when subexpressions are enclosed in capturing parentheses.
  • Each item in the SubMatches collection is the string found and captured by the regular expression.

Requirement

5

Applied to

RegExp Object, Match Object

Match SubMatches Property

The returns of the SubMatches Property of Match Object is a Collection of SubMatch Objects and is contained in a SubMatches Collection.

Count Property

last updated 12/9/2017

is to return the read-only number of elements in the associated Collection or Object.

Syntax

objvar.Count

Argument

objvarRequired. The variable name of the associated Object instantance.CountRequired Property Keyword. To specify the Count Property of an Object..Required. The dot notation used to access the Property of an object.

Remarks

  • Count Property is a genetic Property for all being supported Object.
  • Count Property is a read-only property.

Applied to

Dictionary Object, Drives Collection, Files Collection, Folders Collection, Matches Collection

Item Property

last updated 12/9/2017

is to return the read-only item of an element in the associated collection or Object according to the specified key

Syntax

objvar.Item(key)

Argument

objvarRequired. The variable name of the associated Object instantance.ItemRequired Property Keyword. To specify the Item Property of an Object.keyRequired. To specify the key used to return the item of the specified key..Required. the dot notation used to access the Property of an object.(…)Required. the brackets to enclose the parameters.

Remarks

  • Item Property is a genetic Property for all being supported Object.
  • Item Property is a read-only property.
  • An error will return if the specified key is not found.

Applied to

Matches Collection,

Sideway BICK Blog

21/05


Copyright © 2000-2020 Sideway . All rights reserved Disclaimerslast modified on 26 January 2013