Regex.Matchesとは? わかりやすく解説

Regex.Matches メソッド (String, String, RegexOptions)

options パラメータ一致オプション指定し指定した入力文字列内で、pattern パラメータ指定した正規表現一致する対象をすべて検索します

名前空間: System.Text.RegularExpressions
アセンブリ: System (system.dll 内)
構文構文

Public Shared Function Matches
 ( _
    input As String, _
    pattern As String, _
    options As RegexOptions _
) As MatchCollection
Dim input As String
Dim pattern As String
Dim options As RegexOptions
Dim returnValue As MatchCollection

returnValue = Regex.Matches(input, pattern, options)
public static MatchCollection Matches (
    string input,
    string pattern,
    RegexOptions options
)
public:
static MatchCollection^ Matches (
    String^ input, 
    String^ pattern, 
    RegexOptions options
)
public static MatchCollection Matches (
    String input, 
    String pattern, 
    RegexOptions options
)
public static function Matches
 (
    input : String, 
    pattern : String, 
    options : RegexOptions
) : MatchCollection

パラメータ

input

一致する対象検索する文字列

pattern

一致させる正規表現パターン

options

ビットごとの OR 演算による RegexOption 列挙値の組み合わせ

戻り値
検索によって見つかった Match オブジェクトの MatchCollection。

解説解説
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

Regex.Matches メソッド (String, String)

指定した入力文字列内で、pattern パラメータ指定され正規表現一致する対象をすべて検索します

名前空間: System.Text.RegularExpressions
アセンブリ: System (system.dll 内)
構文構文

解説解説
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

Regex.Matches メソッド (String)

指定した入力文字列内で、正規表現一致する対象をすべて検索します

名前空間: System.Text.RegularExpressions
アセンブリ: System (system.dll 内)
構文構文

Public Function Matches ( _
    input As String _
) As MatchCollection
Dim instance As Regex
Dim input As String
Dim returnValue As MatchCollection

returnValue = instance.Matches(input)
public MatchCollection Matches (
    string input
)
public:
MatchCollection^ Matches (
    String^ input
)
public MatchCollection Matches (
    String input
)
public function Matches (
    input : String
) : MatchCollection

パラメータ

input

一致する対象検索する文字列

戻り値
検索によって見つかった Match オブジェクトの MatchCollection。

解説解説
使用例使用例

このメソッド使用し指定されString インスタンス内の正規表現との一致検索するコード例次に示します

// Find matches.
MatchCollection matches = rx.Matches(text);
// Find matches.
MatchCollection^ matches = rx->Matches( text );
// Find matches.
MatchCollection matches = rx.Matches(text);
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

Regex.Matches メソッド


Regex.Matches メソッド (String, Int32)

入力文字列内の指定した位置から検索開始した場合に、その入力文字列内で正規表現一致する対象をすべて検索します

名前空間: System.Text.RegularExpressions
アセンブリ: System (system.dll 内)
構文構文

Public Function Matches ( _
    input As String, _
    startat As Integer _
) As MatchCollection
Dim instance As Regex
Dim input As String
Dim startat As Integer
Dim returnValue As MatchCollection

returnValue = instance.Matches(input, startat)
public MatchCollection Matches (
    string input,
    int startat
)
public:
MatchCollection^ Matches (
    String^ input, 
    int startat
)
public MatchCollection Matches (
    String input, 
    int startat
)
public function Matches (
    input : String, 
    startat : int
) : MatchCollection

パラメータ

input

一致する対象検索する文字列

startat

入力文字列内の検索開始する文字位置

戻り値
検索によって見つかった Match オブジェクトの MatchCollection。

解説解説
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「Regex.Matches」の関連用語

Regex.Matchesのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



Regex.Matchesのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS