RegexStringValidatorAttribute.Regex プロパティ

定義

正規表現の検証を実行するために使用される文字列を取得します。

public:
 property System::String ^ Regex { System::String ^ get(); };
public string Regex { get; }
member this.Regex : string
Public ReadOnly Property Regex As String

プロパティ値

装飾された構成要素のプロパティに割り当てられる文字列をフィルター処理するために使用される正規表現を含んだ文字列。

Regex プロパティを使用する方法を次の例に示します。


ConfigurationValidatorBase valBase;

RegexStringValidatorAttribute rstrValAttr =
new RegexStringValidatorAttribute(@"\w+\S*");

// Get the regular expression string.
string regex = rstrValAttr.Regex;
Console.WriteLine("Regular expression: {0}", regex);
Dim valBase As _
ConfigurationValidatorBase

Dim rstrValAttr As _
New RegexStringValidatorAttribute("\w+\S*")

' Get the regular expression string.
Dim regex As String = _
rstrValAttr.Regex
Console.WriteLine( _
"Regular expression: {0}", regex)

適用対象