- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Static Public Member Functions

# QRegExp Class Reference

Search for all occurrences

## Detailed Description

Definition at line 61 of file qregexp.h.

`#include <qregexp.h>`

List of all members.

## Public Types
enum | PatternSyntax { RegExp, Wildcard, FixedString, RegExp2, WildcardUnix, W3CXmlSchema11 }
enum | CaretMode { CaretAtZero, CaretAtOffset, CaretWontMatch }
## Public Member Functions
| QRegExp ()
| QRegExp (const QString &pattern, Qt::CaseSensitivity cs=Qt::CaseSensitive, PatternSyntax syntax=RegExp)
| QRegExp (const QRegExp &rx)
| ~QRegExp ()
QRegExp & | operator= (const QRegExp &rx)
bool | operator== (const QRegExp &rx) const
bool | operator!= (const QRegExp &rx) const
bool | isEmpty () const
bool | isValid () const
QString | pattern () const
void | setPattern (const QString &pattern)
Qt::CaseSensitivity | caseSensitivity () const
void | setCaseSensitivity (Qt::CaseSensitivity cs)
PatternSyntax | patternSyntax () const
void | setPatternSyntax (PatternSyntax syntax)
bool | isMinimal () const
void | setMinimal (bool minimal)
bool | exactMatch (const QString &str) const
int | indexIn (const QString &str, int offset=0, CaretMode caretMode=CaretAtZero) const
int | lastIndexIn (const QString &str, int offset=-1, CaretMode caretMode=CaretAtZero) const
int | matchedLength () const
int | captureCount () const
QStringList | capturedTexts () const
QStringList | capturedTexts ()
QString | cap (int nth=0) const
QString | cap (int nth=0)
int | pos (int nth=0) const
int | pos (int nth=0)
QString | errorString () const
QString | errorString ()
## Static Public Member Functions
static QString | escape (const QString &str)

## Member Enumeration Documentation

enum PatternSyntax

Search for all occurrences

Enumerator:

  RegExp | Search for all occurrences
  Wildcard | Search for all occurrences
  FixedString | Search for all occurrences
  RegExp2 | Search for all occurrences
  WildcardUnix | Search for all occurrences
  W3CXmlSchema11 | Search for all occurrences

Definition at line 64 of file qregexp.h.

                           {
            RegExp,
            Wildcard,
            FixedString,
            RegExp2,
            WildcardUnix,
            W3CXmlSchema11 };

enum CaretMode

Search for all occurrences

Enumerator:

  CaretAtZero | Search for all occurrences
  CaretAtOffset | Search for all occurrences
  CaretWontMatch | Search for all occurrences

Definition at line 71 of file qregexp.h.

    { CaretAtZero, CaretAtOffset, CaretWontMatch };

## Constructor & Destructor Documentation

QRegExp | ( |  | ) |

QRegExp | ( | const QString & | pattern,
|  | Qt::CaseSensitivity | cs = `Qt::CaseSensitive`,
|  | PatternSyntax | syntax = `RegExp`
| ) |  | `[explicit]`

QRegExp | ( | const QRegExp & | rx | ) |

~QRegExp | ( |  | ) |

## Member Function Documentation

QRegExp& operator= | ( | const QRegExp & | rx | ) |

bool operator== | ( | const QRegExp & | rx | ) | const

bool operator!= | ( | const QRegExp & | rx | ) | const `[inline]`

Definition at line 81 of file qregexp.h.

    { return !operator==(rx); }

bool isEmpty | ( |  | ) | const

Search for all occurrences

bool isValid | ( |  | ) | const

Search for all occurrences

QString pattern | ( |  | ) | const

Search for all occurrences

void setPattern | ( | const QString & | pattern | ) |

Search for all occurrences

Qt::CaseSensitivity caseSensitivity | ( |  | ) | const

Search for all occurrences

void setCaseSensitivity | ( | Qt::CaseSensitivity | cs | ) |

Search for all occurrences

PatternSyntax patternSyntax | ( |  | ) | const

Search for all occurrences

void setPatternSyntax | ( | PatternSyntax | syntax | ) |

Search for all occurrences

bool isMinimal | ( |  | ) | const

Search for all occurrences

void setMinimal | ( | bool | minimal | ) |

Search for all occurrences

bool exactMatch | ( | const QString & | str | ) | const

Search for all occurrences

int indexIn | ( | const QString & | str,
|  | int | offset = `0`,
|  | CaretMode | caretMode = `CaretAtZero`
| ) |  | const

Search for all occurrences

int lastIndexIn | ( | const QString & | str,
|  | int | offset = `-1`,
|  | CaretMode | caretMode = `CaretAtZero`
| ) |  | const

Search for all occurrences

int matchedLength | ( |  | ) | const

Search for all occurrences

int captureCount | ( |  | ) | const

Search for all occurrences

QStringList capturedTexts | ( |  | ) | const

Search for all occurrences

QStringList capturedTexts | ( |  | ) |

Search for all occurrences

QString cap | ( | int | nth = `0` | ) | const

Search for all occurrences

QString cap | ( | int | nth = `0` | ) |

Search for all occurrences

int pos | ( | int | nth = `0` | ) | const

Search for all occurrences

int pos | ( | int | nth = `0` | ) |

Search for all occurrences

QString errorString | ( |  | ) | const

Search for all occurrences

QString errorString | ( |  | ) |

Search for all occurrences

static QString escape | ( | const QString & | str | ) | `[static]`

Search for all occurrences

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

- QtCore/qregexp.h

QRegExp QRegExp QRegExp QRegExp QRegExp QRegExp QRegExp QRegExp QRegExp QRegExp
QRegExp QRegExp QRegExp QRegExp QRegExp QRegExp QRegExp QRegExp QRegExp QRegExp