diff options
Diffstat (limited to 'doc/man/man3/tqregexp.3qt')
-rw-r--r-- | doc/man/man3/tqregexp.3qt | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/doc/man/man3/tqregexp.3qt b/doc/man/man3/tqregexp.3qt index e0aa9815a..f62f432e5 100644 --- a/doc/man/man3/tqregexp.3qt +++ b/doc/man/man3/tqregexp.3qt @@ -88,7 +88,7 @@ All the functions in this class are reentrant when TQt is built with thread supp .BI "int \fBnumCaptures\fR () const" .br .ti -1c -.BI "QStringList \fBcapturedTexts\fR ()" +.BI "TQStringList \fBcapturedTexts\fR ()" .br .ti -1c .BI "TQString \fBcap\fR ( int nth = 0 )" @@ -325,7 +325,7 @@ Both zero-width positive and zero-width negative lookahead assertions (?=pattern .PP Non-capturing parentheses are also supported, with the same (?:pattern) syntax. .PP -See QStringList::split() and QStringList::join() for equivalents to Perl's split and join functions. +See TQStringList::split() and TQStringList::join() for equivalents to Perl's split and join functions. .PP Note: because C++ transforms \'s they must be written \fItwice\fR in code, e.g. \fB\b\fR must be written \fB\\b\fR. .SH "Code Examples" @@ -449,11 +449,11 @@ One common use of regexps is to split lines of delimited data into their compone .br .fi .PP -In this example our input lines have the format company name, web address and country. Unfortunately the regexp is rather long and not very versatile -- the code will break if we add any more fields. A simpler and better solution is to look for the separator, '\\t' in this case, and take the surrounding text. The QStringList split() function can take a separator string or regexp as an argument and split a string accordingly. +In this example our input lines have the format company name, web address and country. Unfortunately the regexp is rather long and not very versatile -- the code will break if we add any more fields. A simpler and better solution is to look for the separator, '\\t' in this case, and take the surrounding text. The TQStringList split() function can take a separator string or regexp as an argument and split a string accordingly. .PP .nf .br - QStringList field = QStringList::split( "\\t", str ); + TQStringList field = TQStringList::split( "\\t", str ); .br .fi .PP @@ -479,7 +479,7 @@ Wildcard matching can be convenient because of its simplicity, but any wildcard .PP QRegExp can match case insensitively using setCaseSensitive(), and can use non-greedy matching, see setMinimal(). By default QRegExp uses full regexps but this can be changed with setWildcard(). Searching can be forward with search() or backward with searchRev(). Captured text can be accessed using capturedTexts() which returns a string list of all captured strings, or using cap() which returns the captured string for the given index. The pos() function takes a match index and returns the position in the string where the match was made (or -1 if there was no match). .PP -See also QRegExpValidator, TQString, QStringList, Miscellaneous Classes, Implicitly and Explicitly Shared Classes, and Non-GUI Classes. +See also QRegExpValidator, TQString, TQStringList, Miscellaneous Classes, Implicitly and Explicitly Shared Classes, and Non-GUI Classes. .PP .SS "Member Type Documentation" .SH "QRegExp::CaretMode" @@ -536,7 +536,7 @@ Some patterns may lead to a number of matches which cannot be determined in adva .br str = "Offsets: 12 14 99 231 7"; .br - QStringList list; + TQStringList list; .br pos = 0; .br @@ -562,7 +562,7 @@ See also capturedTexts(), pos(), exactMatch(), search(), and searchRev(). .PP Examples: .)l network/archivesearch/archivedialog.ui.h and regexptester/regexptester.cpp. -.SH "QStringList QRegExp::capturedTexts ()" +.SH "TQStringList QRegExp::capturedTexts ()" Returns a list of the captured text strings. .PP The first string in the list is the entire matched string. Each subsequent list element contains a string that matched a (capturing) subexpression of the regexp. @@ -575,7 +575,7 @@ For example: .br int pos = rx.search( "Length: 36 inches" ); .br - QStringList list = rx.capturedTexts(); + TQStringList list = rx.capturedTexts(); .br // list is now ( "36 inches", "36", " ", "inches", "es" ) .br @@ -589,7 +589,7 @@ The above example also captures elements that may be present but which we have n .br int pos = rx.search( "Length: 36 inches" ); .br - QStringList list = rx.capturedTexts(); + TQStringList list = rx.capturedTexts(); .br // list is now ( "36 inches", "36", "inches" ) .br @@ -599,9 +599,9 @@ Note that if you want to iterate over the list, you should iterate over a copy, .PP .nf .br - QStringList list = rx.capturedTexts(); + TQStringList list = rx.capturedTexts(); .br - QStringList::Iterator it = list.begin(); + TQStringList::Iterator it = list.begin(); .br while( it != list.end() ) { .br @@ -749,7 +749,7 @@ Returns the position of the first match, or -1 if there was no match. .PP The \fIcaretMode\fR parameter can be used to instruct whether \fB^\fR should match at index 0 or at \fIoffset\fR. .PP -You might prefer to use TQString::find(), TQString::contains() or even QStringList::grep(). To replace matches use TQString::replace(). +You might prefer to use TQString::find(), TQString::contains() or even TQStringList::grep(). To replace matches use TQString::replace(). .PP Example: .PP |