Capture

Capture CF 1.0, serializable

System.Text.RegularExpressions (system.dll) class

This class represents a single result from a capturing group , which is a segment of a regular expression that is delineated, usually by parentheses. The parentheses signal .NET's regular expression engine to save that segment's result for later use. Capture objects compose the collection returned by Group.Captures . The Value property gets the captured substring. The Index property contains the starting position of the capture in the input string, while Length contains the length of the captured string.

 public class  Capture  {  // Public Instance Properties  public int  Index  {get; }    public int  Length  {get; }    public string  Value  {get; }  // Public Instance Methods    public override string  ToString  ( );  // overrides object  } 

Subclasses

Group

Returned By

CaptureCollection.this

Figure 41-1. The System.Text.RegularExpressions namespace
figs/csn2_4101.gif


C# in a Nutshell
C # in a Nutshell, Second Edition
ISBN: 0596005261
EAN: 2147483647
Year: 2005
Pages: 963

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net