18.01.2013 Views

VBScript Reference Manual for InduSoft Web Studio

VBScript Reference Manual for InduSoft Web Studio

VBScript Reference Manual for InduSoft Web Studio

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>InduSoft</strong> <strong>Web</strong> <strong>Studio</strong> <strong>VBScript</strong> <strong>Reference</strong> <strong>Manual</strong><br />

Match<br />

Description Provides access to the read-only properties of a regular expression match.<br />

Usage For Each Match in Matches<br />

strRet = Match.prop<br />

Rem other statement can go here<br />

Next<br />

Arguments varies with properties and methods used<br />

Match<br />

The Match object. Does not need to be instantiated<br />

Matches<br />

The Matches collection. Needs to be instantiated in a Set statement<br />

prop<br />

A Match object property<br />

strRet<br />

Return value.<br />

Return The return value and type depends on the Match property used<br />

See Also Length property, Value property, FirstIndex property<br />

Remarks A Match object can be only created using the Execute method of the RegExp object, which<br />

actually returns a collection of Match objects. All Match object properties are read-only.<br />

When a regular expression is executed, zero or more Match objects can result. Each Match<br />

object provides access to the string found by the regular expression, the length of the string, and<br />

an index to where the match was found.<br />

Example See example under Matches collection<br />

Property FirstIndex<br />

Description Returns the position in a search string where a match occurs<br />

Usage strRet = objMatch.FirstIndex<br />

Arguments None<br />

Return A numeric value indicating the position in a string where the match occurs.<br />

Remarks The FirstIndex property uses a zero-based offset from the beginning of the search string. In<br />

other words, the first character in the string is identified as character zero (0).<br />

Property Length<br />

Description Returns the length of a match found in a search string.<br />

Usage strRet = objMatch.Length<br />

Arguments None<br />

Return A numeric value indicating the length of a match string<br />

Remarks Always used with the Match object<br />

Property Value<br />

Description Returns the value or text of a match found in a search string.<br />

Usage strRet = objMatch.Length<br />

Arguments None<br />

Return A String containing the match found in the search string<br />

Remarks Always used with the Match object<br />

<strong>InduSoft</strong>, Ltd. 203

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!