Kate
#include <kateregexp.h>
Public Member Functions | |
KateRegExp (const QString &pattern, Qt::CaseSensitivity cs=Qt::CaseSensitive, QRegExp::PatternSyntax syntax=QRegExp::RegExp2) | |
QString | cap (int nth=0) const |
int | indexIn (const QString &str, int offset, int end) const |
bool | isEmpty () const |
bool | isMultiLine () const |
bool | isValid () const |
int | lastIndexIn (const QString &str, int offset, int end) const |
int | matchedLength () const |
int | numCaptures () const |
QString | pattern () const |
int | pos (int nth=0) const |
int | repairPattern (bool &stillMultiLine) |
Detailed Description
Definition at line 27 of file kateregexp.h.
Constructor & Destructor Documentation
|
explicit |
Definition at line 24 of file kateregexp.cpp.
Member Function Documentation
|
inline |
Definition at line 38 of file kateregexp.h.
int KateRegExp::indexIn | ( | const QString & | str, |
int | offset, | ||
int | end | ||
) | const |
Definition at line 308 of file kateregexp.cpp.
|
inline |
Definition at line 33 of file kateregexp.h.
bool KateRegExp::isMultiLine | ( | ) | const |
States, whether the pattern matches multiple lines, even if it was repaired using repairPattern()
.
- Returns
- Whether the pattern matches multiple lines
Definition at line 206 of file kateregexp.cpp.
|
inline |
Definition at line 34 of file kateregexp.h.
int KateRegExp::lastIndexIn | ( | const QString & | str, |
int | offset, | ||
int | end | ||
) | const |
This function is a replacement for QRegExp.lastIndexIn that returns the last match that would have been found when searching forwards, which QRegExp.lastIndexIn does not.
We need this behavior to allow the user to jump back to the last match.
- Parameters
-
str Text to search in offset Offset (-1 starts from end, -2 from one before the end)
- Returns
- Index of match or -1 if no match is found
Definition at line 315 of file kateregexp.cpp.
|
inline |
Definition at line 39 of file kateregexp.h.
|
inline |
Definition at line 36 of file kateregexp.h.
|
inline |
Definition at line 35 of file kateregexp.h.
|
inline |
Definition at line 37 of file kateregexp.h.
int KateRegExp::repairPattern | ( | bool & | stillMultiLine | ) |
Repairs a regular Expression pattern.
This is a workaround to make "." and "\s" not match newlines, which currently is the unconfigurable default in QRegExp.
- Parameters
-
stillMultiLine Multi-line after reparation flag
- Returns
- Number of replacements done
Definition at line 35 of file kateregexp.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:54 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.