QtBase  v6.3.1
Public Types | Public Member Functions | Static Public Member Functions | Friends | Related Functions | List of all members
QRegularExpression Class Reference

The QRegularExpression class provides pattern matching using regular expressions. More...

#include <qregularexpression.h>

Public Types

enum  PatternOption {
  NoPatternOption = 0x0000 , CaseInsensitiveOption = 0x0001 , DotMatchesEverythingOption = 0x0002 , MultilineOption = 0x0004 ,
  ExtendedPatternSyntaxOption = 0x0008 , InvertedGreedinessOption = 0x0010 , DontCaptureOption = 0x0020 , UseUnicodePropertiesOption = 0x0040
}
 
enum  MatchType { NormalMatch = 0 , PartialPreferCompleteMatch , PartialPreferFirstMatch , NoMatch }
 
enum  MatchOption { NoMatchOption = 0x0000 , AnchorAtOffsetMatchOption = 0x0001 , Q_DECL_ENUMERATOR_DEPRECATED_X , DontCheckSubjectStringMatchOption = 0x0002 }
 
enum  WildcardConversionOption { DefaultWildcardConversion = 0x0 , UnanchoredWildcardConversion = 0x1 }
 

Public Member Functions

PatternOptions patternOptions () const
 
void setPatternOptions (PatternOptions options)
 
 QRegularExpression ()
 
 QRegularExpression (const QString &pattern, PatternOptions options=NoPatternOption)
 
 QRegularExpression (const QRegularExpression &re)
 
 QRegularExpression (QRegularExpression &&re)=default
 
 ~QRegularExpression ()
 
QRegularExpressionoperator= (const QRegularExpression &re)
 
void swap (QRegularExpression &other) noexcept
 
QString pattern () const
 
void setPattern (const QString &pattern)
 
bool isValid () const
 
qsizetype patternErrorOffset () const
 
QString errorString () const
 
int captureCount () const
 
QStringList namedCaptureGroups () const
 
QRegularExpressionMatch match (const QString &subject, qsizetype offset=0, MatchType matchType=NormalMatch, MatchOptions matchOptions=NoMatchOption) const
 
QRegularExpressionMatch match (QStringView subjectView, qsizetype offset=0, MatchType matchType=NormalMatch, MatchOptions matchOptions=NoMatchOption) const
 
QRegularExpressionMatchIterator globalMatch (const QString &subject, qsizetype offset=0, MatchType matchType=NormalMatch, MatchOptions matchOptions=NoMatchOption) const
 
QRegularExpressionMatchIterator globalMatch (QStringView subjectView, qsizetype offset=0, MatchType matchType=NormalMatch, MatchOptions matchOptions=NoMatchOption) const
 
void optimize () const
 
bool operator== (const QRegularExpression &re) const
 
bool operator!= (const QRegularExpression &re) const
 

Static Public Member Functions

static QString escape (const QString &str)
 
static QString wildcardToRegularExpression (const QString &str, WildcardConversionOptions options=DefaultWildcardConversion)
 
static QString anchoredPattern (const QString &expression)
 
static QString escape (QStringView str)
 
static QString wildcardToRegularExpression (QStringView str, WildcardConversionOptions options=DefaultWildcardConversion)
 
static QString anchoredPattern (QStringView expression)
 
static QRegularExpression fromWildcard (QStringView pattern, Qt::CaseSensitivity cs=Qt::CaseInsensitive, WildcardConversionOptions options=DefaultWildcardConversion)
 

Friends

struct QRegularExpressionPrivate
 
class QRegularExpressionMatch
 
struct QRegularExpressionMatchPrivate
 
class QRegularExpressionMatchIterator
 
Q_CORE_EXPORT size_t qHash (const QRegularExpression &key, size_t seed) noexcept
 

Related Functions

(Note that these are not member functions.)

size_t qHash (const QRegularExpression &key, size_t seed) noexcept
 
QDataStreamoperator<< (QDataStream &out, const QRegularExpression &re)
 
QDataStreamoperator>> (QDataStream &in, QRegularExpression &re)
 
QDebug operator<< (QDebug debug, const QRegularExpression &re)
 
QDebug operator<< (QDebug debug, QRegularExpression::PatternOptions patternOptions)
 

Detailed Description

The QRegularExpression class provides pattern matching using regular expressions.

\inmodule QtCore \reentrant

Since
5.0

\keyword regular expression

Regular expressions, or {regexps}, are a very powerful tool to handle strings and texts. This is useful in many contexts, e.g.,

\table \row

This document is by no means a complete reference to pattern matching using regular expressions, and the following parts will require the reader to have some basic knowledge about Perl-like regular expressions and their pattern syntax.

Good references about regular expressions include:

\list

Definition at line 68 of file qregularexpression.h.

Member Enumeration Documentation

◆ MatchOption

\value NoMatchOption No match options are set.

\value AnchoredMatchOption Use AnchorAtOffsetMatchOption instead.

\value AnchorAtOffsetMatchOption The match is constrained to start exactly at the offset passed to match() in order to be successful, even if the pattern string does not contain any metacharacter that anchors the match at that point. Note that passing this option does not anchor the end of the match to the end of the subject; if you want to fully anchor a regular expression, use anchoredPattern(). This enum value has been introduced in Qt 6.0.

\value DontCheckSubjectStringMatchOption The subject string is not checked for UTF-16 validity before attempting a match. Use this option with extreme caution, as attempting to match an invalid string may crash the program and/or constitute a security issue. This enum value has been introduced in Qt 5.4.

Enumerator
NoMatchOption 
AnchorAtOffsetMatchOption 
Q_DECL_ENUMERATOR_DEPRECATED_X 
DontCheckSubjectStringMatchOption 

Definition at line 117 of file qregularexpression.h.

◆ MatchType

The MatchType enum defines the type of the match that should be attempted against the subject string.

\value NormalMatch A normal match is done.

\value PartialPreferCompleteMatch 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.

\value PartialPreferFirstMatch 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 \l{partial matching} section for more details.

\value NoMatch 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.

Enumerator
NormalMatch 
PartialPreferCompleteMatch 
PartialPreferFirstMatch 
NoMatch 

Definition at line 110 of file qregularexpression.h.

◆ PatternOption

The PatternOption enum defines modifiers to the way the pattern string should be interpreted, and therefore the way the pattern matches against a subject string.

\value NoPatternOption No pattern options are set.

\value CaseInsensitiveOption The pattern should match against the subject string in a case insensitive way. This option corresponds to the /i modifier in Perl regular expressions.

\value DotMatchesEverythingOption The dot metacharacter ({.}) in the pattern string is allowed to match any character in the subject string, including newlines (normally, the dot does not match newlines). This option corresponds to the {/s} modifier in Perl regular expressions.

\value MultilineOption The caret ({^}) and the dollar ({$}) metacharacters in the pattern string are allowed to match, respectively, immediately after and immediately before any newline in the subject string, as well as at the very beginning and at the very end of the subject string. This option corresponds to the {/m} modifier in Perl regular expressions.

\value ExtendedPatternSyntaxOption Any whitespace in the pattern string which is not escaped and outside a character class is ignored. Moreover, an unescaped sharp ({#}) outside a character class causes all the following characters, until the first newline (included), to be ignored. This can be used to increase the readability of a pattern string as well as put comments inside regular expressions; this is particularly useful if the pattern string is loaded from a file or written by the user, because in C++ code it is always possible to use the rules for string literals to put comments outside the pattern string. This option corresponds to the {/x} modifier in Perl regular expressions.

\value InvertedGreedinessOption The greediness of the quantifiers is inverted: {*}, {+}, {?}, {{m,n}}, etc. become lazy, while their lazy versions ({*?}, {+?}, {??}, {{m,n}?}, etc.) become greedy. There is no equivalent for this option in Perl regular expressions.

\value DontCaptureOption The non-named capturing groups do not capture substrings; named capturing groups still work as intended, as well as the implicit capturing group number 0 corresponding to the entire match. There is no equivalent for this option in Perl regular expressions.

\value UseUnicodePropertiesOption The meaning of the {\w}, {\d}, etc., character classes, as well as the meaning of their counterparts ({\W}, {\D}, etc.), is changed from matching ASCII characters only to matching any character with the corresponding Unicode property. For instance, {\d} is changed to match any character with the Unicode Nd (decimal digit) property; {\w} to match any character with either the Unicode L (letter) or N (digit) property, plus underscore, and so on. This option corresponds to the {/u} modifier in Perl regular expressions.

Enumerator
NoPatternOption 
CaseInsensitiveOption 
DotMatchesEverythingOption 
MultilineOption 
ExtendedPatternSyntaxOption 
InvertedGreedinessOption 
DontCaptureOption 
UseUnicodePropertiesOption 

Definition at line 71 of file qregularexpression.h.

◆ WildcardConversionOption

Since
6.0

The WildcardConversionOption enum defines modifiers to the way a wildcard glob pattern gets converted to a regular expression pattern.

\value DefaultWildcardConversion No conversion options are set.

\value UnanchoredWildcardConversion The conversion will not anchor the pattern. This allows for partial string matches of wildcard expressions.

Enumerator
DefaultWildcardConversion 
UnanchoredWildcardConversion 

Definition at line 152 of file qregularexpression.h.

Constructor & Destructor Documentation

◆ QRegularExpression() [1/4]

QRegularExpression::QRegularExpression ( )

Constructs a QRegularExpression object with an empty pattern and no pattern options.

See also
setPattern(), setPatternOptions()

Definition at line 1369 of file qregularexpression.cpp.

◆ QRegularExpression() [2/4]

QRegularExpression::QRegularExpression ( const QString pattern,
PatternOptions  options = NoPatternOption 
)
explicit

Constructs a QRegularExpression object using the given pattern as pattern and the options as the pattern options.

See also
setPattern(), setPatternOptions()

Definition at line 1380 of file qregularexpression.cpp.

◆ QRegularExpression() [3/4]

QRegularExpression::QRegularExpression ( const QRegularExpression re)

Constructs a QRegularExpression object as a copy of re.

See also
operator=()

Definition at line 1392 of file qregularexpression.cpp.

◆ QRegularExpression() [4/4]

QRegularExpression::QRegularExpression ( QRegularExpression &&  re)
default
Since
6.1

Constructs a QRegularExpression object by moving from re.

Note that a moved-from QRegularExpression can only be destroyed or assigned to. The effect of calling other functions than the destructor or one of the assignment operators is undefined.

See also
operator=()

◆ ~QRegularExpression()

QRegularExpression::~QRegularExpression ( )

Destroys the QRegularExpression object.

Definition at line 1414 of file qregularexpression.cpp.

Member Function Documentation

◆ anchoredPattern() [1/2]

QRegularExpression::anchoredPattern ( const QString expression)
inlinestatic
Since
5.12 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 168 of file qregularexpression.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ anchoredPattern() [2/2]

QString QRegularExpression::anchoredPattern ( QStringView  expression)
static
Since
5.15

Returns the expression wrapped between the {\A} and {\z} anchors to be used for exact matching.

Definition at line 2045 of file qregularexpression.cpp.

◆ captureCount()

int QRegularExpression::captureCount ( ) const

Returns the number of capturing groups inside the pattern string, or -1 if the regular expression is not valid.

Note
The implicit capturing group 0 is {not} included in the returned number.
See also
isValid()

Definition at line 1495 of file qregularexpression.cpp.

Here is the call graph for this function:

◆ errorString()

QString QRegularExpression::errorString ( ) const

Returns a textual description of the error found when checking the validity of the regular expression, or "no error" if no error was found.

See also
isValid(), patternErrorOffset()

Definition at line 1578 of file qregularexpression.cpp.

Here is the call graph for this function:

◆ escape() [1/2]

QString QRegularExpression::escape ( const QString str)
inlinestatic

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 158 of file qregularexpression.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ escape() [2/2]

QString QRegularExpression::escape ( QStringView  str)
static
Since
5.15

Escapes all characters of str so that they no longer have any special meaning when used as a regular expression pattern string, and returns the escaped string. For instance:

This is very convenient in order to build patterns from arbitrary strings:

Note
This function implements Perl's quotemeta algorithm and escapes with a backslash all characters in str, except for the characters in the {[A-Z]}, {[a-z]} and {[0-9]} ranges, as well as the underscore ({_}) character. The only difference with Perl is that a literal NUL inside str is escaped with the sequence {"\\0"} (backslash + {'0'}), instead of {"\\\0"} (backslash + {NUL}).

Definition at line 1824 of file qregularexpression.cpp.

Here is the call graph for this function:

◆ fromWildcard()

QRegularExpression QRegularExpression::fromWildcard ( QStringView  pattern,
Qt::CaseSensitivity  cs = Qt::CaseInsensitive,
WildcardConversionOptions  options = DefaultWildcardConversion 
)
static
Since
6.0 Returns a regular expression of the glob pattern pattern. The regular expression will be case sensitive if cs is \l{Qt::CaseSensitive}, and converted according to options.

Equivalent to

return QRegularExpression(wildcardToRegularExpression(str, options), reOptions);
static QString wildcardToRegularExpression(const QString &str, WildcardConversionOptions options=DefaultWildcardConversion)
QString str
[2]
@ CaseSensitive
Definition: qnamespace.h:1284

Definition at line 2025 of file qregularexpression.cpp.

Here is the caller graph for this function:

◆ globalMatch() [1/2]

QRegularExpressionMatchIterator QRegularExpression::globalMatch ( const QString subject,
qsizetype  offset = 0,
MatchType  matchType = NormalMatch,
MatchOptions  matchOptions = NoMatchOption 
) const

Attempts to perform a global match of the regular expression against the given subject string, starting at the position offset inside the subject, using a match of type matchType and honoring the given matchOptions.

The returned QRegularExpressionMatchIterator is positioned before the first match result (if any).

Note
The data referenced by subject should remain valid as long as there are QRegularExpressionMatch objects using it. At the moment Qt makes a (shallow) copy of the data, but this behavior may change in a future version of Qt.
See also
QRegularExpressionMatchIterator, {global matching}

Definition at line 1695 of file qregularexpression.cpp.

Here is the caller graph for this function:

◆ globalMatch() [2/2]

QRegularExpressionMatchIterator QRegularExpression::globalMatch ( QStringView  subjectView,
qsizetype  offset = 0,
MatchType  matchType = NormalMatch,
MatchOptions  matchOptions = NoMatchOption 
) const
Since
6.0 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Attempts to perform a global match of the regular expression against the given subjectView string view, starting at the position offset inside the subject, using a match of type matchType and honoring the given matchOptions.

The returned QRegularExpressionMatchIterator is positioned before the first match result (if any).

Note
The data referenced by subjectView must remain valid as long as there are QRegularExpressionMatchIterator or QRegularExpressionMatch objects using it.
See also
QRegularExpressionMatchIterator, {global matching}

Definition at line 1727 of file qregularexpression.cpp.

◆ isValid()

bool QRegularExpression::isValid ( ) const

Returns true if the regular expression is a valid regular expression (that is, it contains no syntax errors, etc.), or false otherwise. Use errorString() to obtain a textual description of the error.

See also
errorString(), patternErrorOffset()

Definition at line 1566 of file qregularexpression.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ match() [1/2]

QRegularExpressionMatch QRegularExpression::match ( const QString subject,
qsizetype  offset = 0,
MatchType  matchType = NormalMatch,
MatchOptions  matchOptions = NoMatchOption 
) const

Attempts to match the regular expression against the given subject string, starting at the position offset inside the subject, using a match of type matchType and honoring the given matchOptions.

The returned QRegularExpressionMatch object contains the results of the match.

Note
The data referenced by subject should remain valid as long as there are QRegularExpressionMatch objects using it. At the moment Qt makes a (shallow) copy of the data, but this behavior may change in a future version of Qt.
See also
QRegularExpressionMatch, {normal matching}

Definition at line 1633 of file qregularexpression.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ match() [2/2]

QRegularExpressionMatch QRegularExpression::match ( QStringView  subjectView,
qsizetype  offset = 0,
MatchType  matchType = NormalMatch,
MatchOptions  matchOptions = NoMatchOption 
) const
Since
6.0 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Attempts to match the regular expression against the given subjectView string view, starting at the position offset inside the subject, using a match of type matchType and honoring the given matchOptions.

The returned QRegularExpressionMatch object contains the results of the match.

Note
The data referenced by subjectView must remain valid as long as there are QRegularExpressionMatch objects using it.
See also
QRegularExpressionMatch, {normal matching}

Definition at line 1664 of file qregularexpression.cpp.

Here is the call graph for this function:

◆ namedCaptureGroups()

QStringList QRegularExpression::namedCaptureGroups ( ) const
Since
5.1

Returns a list of captureCount() + 1 elements, containing the names of the named capturing groups in the pattern string. The list is sorted such that the element of the list at position {i} is the name of the {i}-th capturing group, if it has a name, or an empty string if that capturing group is unnamed.

For instance, given the regular expression

namedCaptureGroups() will return the following list:

which corresponds to the fact that the capturing group #0 (corresponding to the whole match) has no name, the capturing group #1 has name "day", the capturing group #2 has name "month", etc.

If the regular expression is not valid, returns an empty list.

See also
isValid(), QRegularExpressionMatch::captured(), QString::isEmpty()

Definition at line 1527 of file qregularexpression.cpp.

Here is the call graph for this function:

◆ operator!=()

Returns true if the regular expression is different from re, or false otherwise.

See also
operator==()

Definition at line 181 of file qregularexpression.h.

Here is the call graph for this function:

◆ operator=()

QRegularExpression & QRegularExpression::operator= ( const QRegularExpression re)

Assigns the regular expression re to this object, and returns a reference to the copy. Both the pattern and the pattern options are copied.

Move-assigns the regular expression re to this object, and returns a reference to the result. Both the pattern and the pattern options are copied.

Note that a moved-from QRegularExpression can only be destroyed or assigned to. The effect of calling other functions than the destructor or one of the assignment operators is undefined.

Definition at line 1424 of file qregularexpression.cpp.

◆ operator==()

bool QRegularExpression::operator== ( const QRegularExpression re) const

Returns true if the regular expression is equal to re, or false otherwise. Two QRegularExpression objects are equal if they have the same pattern string and the same pattern options.

See also
operator!=()

Definition at line 1761 of file qregularexpression.cpp.

◆ optimize()

void QRegularExpression::optimize ( ) const
Since
5.4

Compiles the pattern immediately, including JIT compiling it (if the JIT is enabled) for optimization.

See also
isValid(), {Debugging Code that Uses QRegularExpression}

Definition at line 1749 of file qregularexpression.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pattern()

QString QRegularExpression::pattern ( ) const

Returns the pattern string of the regular expression.

See also
setPattern(), patternOptions()

Definition at line 1442 of file qregularexpression.cpp.

Here is the caller graph for this function:

◆ patternErrorOffset()

qsizetype QRegularExpression::patternErrorOffset ( ) const

Returns the offset, inside the pattern string, at which an error was found when checking the validity of the regular expression. If no error was found, then -1 is returned.

See also
pattern(), isValid(), errorString()

Definition at line 1612 of file qregularexpression.cpp.

Here is the call graph for this function:

◆ patternOptions()

QRegularExpression::PatternOptions QRegularExpression::patternOptions ( ) const

Returns the pattern options for the regular expression.

See also
setPatternOptions(), pattern()

Definition at line 1467 of file qregularexpression.cpp.

Here is the caller graph for this function:

◆ setPattern()

void QRegularExpression::setPattern ( const QString pattern)

Sets the pattern string of the regular expression to pattern. The pattern options are left unchanged.

See also
pattern(), setPatternOptions()

Definition at line 1453 of file qregularexpression.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setPatternOptions()

void QRegularExpression::setPatternOptions ( PatternOptions  options)

Sets the given options as the pattern options of the regular expression. The pattern string is left unchanged.

See also
patternOptions(), setPattern()

Definition at line 1478 of file qregularexpression.cpp.

Here is the caller graph for this function:

◆ swap()

void QRegularExpression::swap ( QRegularExpression other)
inlinenoexcept

Swaps the regular expression other with this regular expression. This operation is very fast and never fails.

Definition at line 97 of file qregularexpression.h.

Here is the call graph for this function:

◆ wildcardToRegularExpression() [1/2]

QString QRegularExpression::wildcardToRegularExpression ( const QString pattern,
WildcardConversionOptions  options = DefaultWildcardConversion 
)
inlinestatic
Since
5.12

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 163 of file qregularexpression.h.

Here is the caller graph for this function:

◆ wildcardToRegularExpression() [2/2]

QString QRegularExpression::wildcardToRegularExpression ( QStringView  pattern,
WildcardConversionOptions  options = DefaultWildcardConversion 
)
static
Since
5.15

Returns a regular expression representation of the given glob pattern. The transformation is targeting file path globbing, which means in particular that path separators receive special treatment. This implies that it is not just a basic translation from "*" to ".*".

By default, the returned regular expression is fully anchored. In other words, there is no need of calling anchoredPattern() again on the result. To get an a regular expression that is not anchored, pass UnanchoredWildcardConversion as the conversion options.

This implementation follows closely the definition of wildcard for glob patterns: \table \row

  • {c}
  • Any character represents itself apart from those mentioned below. Thus {c} matches the character c. \row
  • {?}
  • Matches any single character. It is the same as {.} in full regexps. \row
  • {*}
  • Matches zero or more of any characters. It is the same as {.*} in full regexps. \row
  • {[abc]}
  • Matches one character given in the bracket. \row
  • {[a-c]}
  • Matches one character from the range given in the bracket. \row
  • {[!abc]}
  • Matches one character that is not given in the bracket. It is the same as {[^abc]} in full regexp. \row
  • {[!a-c]}
  • Matches one character that is not from the range given in the bracket. It is the same as {[^a-c]} in full regexp. \endtable
Note
The backslash (\) character is not an escape char in this context. In order to match one of the special characters, place it in square brackets (for example, {[?]}).

More information about the implementation can be found in: \list

See also
escape()

Definition at line 1931 of file qregularexpression.cpp.

Friends And Related Function Documentation

◆ operator<<() [1/3]

QDataStream & operator<< ( QDataStream out,
const QRegularExpression re 
)
related

Writes the regular expression re to stream out.

See also
{Serializing Qt Data Types}

Definition at line 2752 of file qregularexpression.cpp.

Here is the call graph for this function:

◆ operator<<() [2/3]

QDebug operator<< ( QDebug  debug,
const QRegularExpression re 
)
related

Writes the regular expression re into the debug object debug for debugging purposes.

See also
{Debugging Techniques}

Definition at line 2785 of file qregularexpression.cpp.

Here is the call graph for this function:

◆ operator<<() [3/3]

QDebug operator<< ( QDebug  debug,
QRegularExpression::PatternOptions  patternOptions 
)
related

Writes the pattern options patternOptions into the debug object debug for debugging purposes.

See also
{Debugging Techniques}

Definition at line 2800 of file qregularexpression.cpp.

◆ operator>>()

QDataStream & operator>> ( QDataStream in,
QRegularExpression re 
)
related

Reads a regular expression from stream in into re.

See also
{Serializing Qt Data Types}

Definition at line 2765 of file qregularexpression.cpp.

Here is the call graph for this function:

◆ qHash() [1/2]

size_t qHash ( const QRegularExpression key,
size_t  seed 
)
related
Since
5.6

Returns the hash value for key, using seed to seed the calculation.

Definition at line 1794 of file qregularexpression.cpp.

◆ qHash [2/2]

size_t qHash ( const QRegularExpression key,
size_t  seed = 0 
)
friend
Since
5.6

Returns the hash value for key, using seed to seed the calculation.

Definition at line 1794 of file qregularexpression.cpp.

◆ QRegularExpressionMatch

friend class QRegularExpressionMatch
friend

Definition at line 185 of file qregularexpression.h.

◆ QRegularExpressionMatchIterator

friend class QRegularExpressionMatchIterator
friend

Definition at line 187 of file qregularexpression.h.

◆ QRegularExpressionMatchPrivate

friend struct QRegularExpressionMatchPrivate
friend

Definition at line 186 of file qregularexpression.h.

◆ QRegularExpressionPrivate

friend struct QRegularExpressionPrivate
friend

Definition at line 184 of file qregularexpression.h.


The documentation for this class was generated from the following files: