Match クラス

1 回の正規表現検索に一致した結果を表します。

この型のすべてのメンバの一覧については、Match メンバ を参照してください。

System.Object
   System.Text.RegularExpressions.Capture
      System.Text.RegularExpressions.Group
         System.Text.RegularExpressions.Match

<Serializable>
Public Class Match   Inherits Group
[C#]
[Serializable]
public class Match : Group
[C++]
[Serializable]
public __gc class Match : public Group
[JScript]
public
   Serializable
class Match extends Group

スレッドセーフ

この型の public static (Visual Basicでは Shared) のすべてのメンバは、マルチスレッド操作で安全に使用できます。インスタンスのメンバの場合は、スレッドセーフであるとは限りません。

解説

1 回の検索で一致した対象には複数のキャプチャ グループがかかわる場合があるため、 Match には GroupCollection を返す Groups プロパティがあります。 GroupCollection には各グループを返すアクセサがあります。 Match は、一致した部分文字列全体に直接アクセスできるように、 Group から継承します。つまり、 Match インスタンス自体は Match.Groups[0] (Visual Basic の場合は Match.Groups(0)) と等価です。 Match オブジェクトは変更不可で、パブリック コンストラクタはありません。

必要条件

名前空間: System.Text.RegularExpressions

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ, .NET Compact Framework - Windows CE .NET

アセンブリ: System (System.dll 内)

参照

Match メンバ | System.Text.RegularExpressions 名前空間