http://docwiki.embarcadero.com/Libraries/Tokyo/en/System.RegularExpressions.TRegExOption
http://docwiki.embarcadero.com/Libraries/Tokyo/en/System.RegularExpressions.TRegExOption
Where is description of roNotEmpty option? What does this option do?
http://docwiki.embarcadero.com/Libraries/Tokyo/en/System.RegularExpressions.TRegExOption
Where is description of roNotEmpty option? What does this option do?
http://docwiki.embarcadero.com/Libraries/Tokyo/en/System.RegularExpressions.TRegExOption
roNotEmpty maps to System.RegularExpressionsCore.TPerlRegExState.preNotEmpty.
ReplyDeleteTPerlRegExState = set of (
preNotBOL, // Not Beginning Of Line: ^ does not match at the start of Subject
preNotEOL, // Not End Of Line: $ does not match at the end of Subject
preNotEmpty // Empty matches not allowed
);
In TregEx.Create:
ReplyDeleteif (roNotEmpty in Options) then
FRegEx.State := [preNotEmpty];
preNotEmpty is a TPerlRegExState which is defined as:
TPerlRegExState = set of (
preNotBOL, // Not Beginning Of Line: ^ does not match at the start of Subject
preNotEOL, // Not End Of Line: $ does not match at the end of Subject
preNotEmpty // Empty matches not allowed
);
So roNotEmpty seems to indicate that empty matches are not allowed.