Logo Search packages:      
Sourcecode: qt-x11-free version File versions

bool QRegExp::isValid (  )  const

Returns TRUE if the regular expression is valid; otherwise returns FALSE. An invalid regular expression never matches.

The pattern [a-z is an example of an invalid pattern, since it lacks a closing square bracket.

Note that the validity of a regexp may also depend on the setting of the wildcard flag, for example *.html is a valid wildcard regexp but an invalid full regexp.

See also:

Definition at line 3432 of file qregexp.cpp.

Referenced by errorString().

    if ( priv->pattern.isEmpty() ) {
      return TRUE;
    } else {
      return eng->isValid();

Generated by  Doxygen 1.6.0   Back to index