Logo Search packages:      
Sourcecode: cb2bib version File versions

void EQRegExp::setMinimal ( bool  minimal  ) 

Enables or disables minimal matching. If minimal is false, matching is greedy (maximal) which is the default.

For example, suppose we have the input string "We must be bold, very bold!" and the pattern {.*}. With the default greedy (maximal) matching, the match is "We must be {bold, very bold}!". But with minimal (non-greedy) matching, the first match is: "We must be {bold}, very bold!" and the second match is "We must be bold, very {bold}!". In practice we might use the pattern {[^<]*</b>} instead, although this will still fail for nested tags.

See also:

Definition at line 3698 of file eqregexp.cpp.

Referenced by operator>>().

    priv->min = minimal;

Generated by  Doxygen 1.6.0   Back to index