Struct qt_core::q_regular_expression::MatchType
source · pub struct MatchType(/* private fields */);
Expand description
The MatchType enum defines the type of the match that should be attempted against the subject string.
C++ enum: QRegularExpression::MatchType
.
The MatchType enum defines the type of the match that should be attempted against the subject string.
Implementations§
source§impl MatchType
impl MatchType
sourcepub const NormalMatch: MatchType = _
pub const NormalMatch: MatchType = _
A normal match is done. (C++ enum variant: NormalMatch = 0
)
sourcepub const PartialPreferCompleteMatch: MatchType = _
pub const PartialPreferCompleteMatch: MatchType = _
The pattern string is matched partially against the subject string. If a partial match is found, then it is recorded, and other matching alternatives are tried as usual. If a complete match is then found, then it’s preferred to the partial match; in this case only the complete match is reported. If instead no complete match is found (but only the partial one), then the partial one is reported. (C++ enum variant: PartialPreferCompleteMatch = 1
)
sourcepub const PartialPreferFirstMatch: MatchType = _
pub const PartialPreferFirstMatch: MatchType = _
The pattern string is matched partially against the subject string. If a partial match is found, then matching stops and the partial match is reported. In this case, other matching alternatives (potentially leading to a complete match) are not tried. Moreover, this match type assumes that the subject string only a substring of a larger text, and that (in this text) there are other characters beyond the end of the subject string. This can lead to surprising results; see the discussion in the partial matching section for more details. (C++ enum variant: PartialPreferFirstMatch = 2
)
sourcepub const NoMatch: MatchType = _
pub const NoMatch: MatchType = _
No matching is done. This value is returned as the match type by a default constructed QRegularExpressionMatch or QRegularExpressionMatchIterator. Using this match type is not very useful for the user, as no matching ever happens. This enum value has been introduced in Qt 5.1. (C++ enum variant: NoMatch = 3
)