System.RegularExpressionsCore.TPerlRegExOptions
Delphi
TPerlRegExOptions = set of (
preCaseLess, // /i -> Case insensitive
preMultiLine, // /m -> ^ and $ also match before/after a newline, not just at the beginning and the end of the string
preSingleLine, // /s -> Dot matches any character, including \n (newline). Otherwise, it matches anything except \n
preExtended, // /x -> Allow regex to contain extra whitespace, newlines and Perl-style comments, all of which will be filtered out
preAnchored, // /A -> Successful match can only occur at the start of the subject or right after the previous match
preUnGreedy, // Repeat operators (+, *, ?) are not greedy by default (i.e. they try to match the minimum number of characters instead of the maximum)
preNoAutoCapture // (group) is a non-capturing group; only named groups capture
);
C++
typedef System::Set<System_Regularexpressionscore__1, System_Regularexpressionscore__1::preCaseLess, System_Regularexpressionscore__1::preNoAutoCapture> TPerlRegExOptions;
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
set typedef |
public | System.RegularExpressionsCore.pas System.RegularExpressionsCore.hpp |
System.RegularExpressionsCore | System.RegularExpressionsCore |
説明
Perl 正規表現で使用する、マッチング オプションの列挙型セット。
オプション | 意味 |
---|---|
|
大文字小文字を区別せずに正規表現に一致するかどうかを試します。このオプションを設定すると、'Bye' は 'Bye'、'bye'、'BYE'、だけでなく 'byE'、'bYe' などとも一致します。設定しなければ、'Bye' のみと一致します。このオプションは、Perl の /i 修飾子に相当します。 |
|
正規表現演算子の ^(文字列の先頭)と $(文字列の末尾)は、Subject 文字列内の改行の直後または直前でも一致します。これによって、複数行にわたる 1 つの文字列を、事実上、複数の文字列として扱うことができます。 このオプションは、Perl の /m 修飾子に相当します。 |
|
通常、ドット(.)は改行(\n)以外の任意の文字と一致します。 |
|
正規表現に、余分なホワイトスペース、改行、および Perl 形式のコメントを含めることができます。これらは、すべて取り除かれます。 これは、"フリースペーシング モード" と呼ばれることもあります。 |
|
正規表現は、対象文字列の先頭、または前の一致の直後でのみ一致します。 |
|
繰り返しの演算子(?、*、+、{num,num})は、デフォルトでは最大限に(つまり、できる限り多くの文字と一致するように)適用されます。 |
|
正規表現が、名前の付いたグループのみを対象とするようにできます。(group) は、非対象グループです。 |