ZennoLab Assemblies Documentation
Regex Method
Example 
ZennoLab.Macros Namespace > TextProcessing Class : Regex Method

Type: System.String

The source string.

Type: System.String

The target regex.

Type: System.String

The range of collections for return.

Type: System.String

The group numbers for exclude in result.

Returns groups collection of matches for target regex.
Syntax

Parameters

sourceString

Type: System.String

The source string.

sourceRegex

Type: System.String

The target regex.

range

Type: System.String

The range of collections for return.

excludeGroup

Type: System.String

The group numbers for exclude in result.

Return Value

Type: System.Collections.Generic.List

A collection of matches

Example
The following example shows call the Regex method.
// get even matches without group number 0
var matches = Macros.TextProcessing.Regex("Some string 42", @"(.+)\ (.+)", "even", "0");
// get even matches without group number 0
$matches = Macros::TextProcessing::Regex("Some string 42", @"(.+)\ (.+)", "even", "0");
Requirements

Target Platforms: Desktop: Windows XP SP3 and older. Server: Windows Server 2003 and older.

See Also

Reference

TextProcessing Class
TextProcessing Members