System.RegularExpressionsCore.TPerlRegExState

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

type TPerlRegExState = set of (preNotBOL, preNotEOL, preNotEmpty);

C++

typedef System::Set<System_Regularexpressionscore__2, System_Regularexpressionscore__2::preNotBOL, System_Regularexpressionscore__2::preNotEmpty> TPerlRegExState;

Properties

Type Visibility Source Unit Parent
set
typedef
public
System.RegularExpressionsCore.pas
System.RegularExpressionsCore.hpp
System.RegularExpressionsCore System.RegularExpressionsCore

Description

Enumeration type of the TPerlRegEx State property.

Possible states:

State Meaning

preNotBOL

Do not match ^ or \A at the start of the Subject string. Set this State if the Subject string is not the logical beginning of the data the user is working with.

preNotEOL

Do not match $ or \Z at the end of the Subject string. Set this state if the Subject string is not the logical end of the data the user is working with.

preNotEmpty

Do not match an empty string, i.e. if Match returns true, MatchedText will never be an empty string. This can be useful if everything in your regular expression is optional (e.g.: a?b?c?). The match returned is normally the leftmost, longest match. If the subject is "dabdabc", it would match the empty string right before "d". With this option, the regex will match "ab" (chars 2 and 3 in the subject), the leftmost, longest match that is not an empty string. MatchAgain will match "abc" at the end of the subject.

See Also