summaryrefslogtreecommitdiffstats
path: root/doc/html/ntqregexp.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/html/ntqregexp.html')
-rw-r--r--doc/html/ntqregexp.html72
1 files changed, 36 insertions, 36 deletions
diff --git a/doc/html/ntqregexp.html b/doc/html/ntqregexp.html
index 94480a79f..6bfdc27bb 100644
--- a/doc/html/ntqregexp.html
+++ b/doc/html/ntqregexp.html
@@ -507,7 +507,7 @@ in a loop.
equivalents for $`, $' or $+. Perl's capturing variables, $1, $2,
... correspond to cap(1) or capturedTexts()[1], cap(2) or
capturedTexts()[2], etc.
-<p> To substitute a pattern use <a href="ntqstring.html#replace">TQString::replace</a>().
+<p> To substitute a pattern use <a href="tqstring.html#replace">TQString::replace</a>().
<p> Perl's extended <tt>/x</tt> syntax is not supported, nor are
directives, e.g. (?i), or regexp comments, e.g. (?#comment). On
the other hand, C++'s rules for literal strings can be used to
@@ -524,7 +524,7 @@ syntax as Perl. Perl's lookbehind assertions, "independent"
subexpressions and conditional expressions are not supported.
<p> Non-capturing parentheses are also supported, with the same
(?:pattern) syntax.
-<p> See <a href="ntqstringlist.html#split">TQStringList::split</a>() and <a href="ntqstringlist.html#join">TQStringList::join</a>() for equivalents
+<p> See <a href="tqstringlist.html#split">TQStringList::split</a>() and <a href="tqstringlist.html#join">TQStringList::join</a>() for equivalents
to Perl's split and join functions.
<p> Note: because C++ transforms &#92;'s they must be written <em>twice</em> in
code, e.g. <b>&#92;b</b> must be written <b>&#92;&#92;b</b>.
@@ -562,7 +562,7 @@ to match strings which contain no whitespace.
word 'letter' is also captured (because of the parentheses). We
can see what text we've captured like this:
<p> <pre>
- <a href="ntqstring.html">TQString</a> captured = rx.cap( 1 ); // captured == "letter"
+ <a href="tqstring.html">TQString</a> captured = rx.cap( 1 ); // captured == "letter"
</pre>
<p> This will capture the text from the first set of capturing
@@ -571,18 +571,18 @@ right). The parentheses are counted from 1 since <a href="#cap">cap</a>( 0 ) is
whole matched regexp (equivalent to '&' in most regexp engines).
<p> <pre>
TQRegExp rx( "&amp;(?!amp;)" ); // match ampersands but not &amp;amp;
- <a href="ntqstring.html">TQString</a> line1 = "This &amp; that";
- line1.<a href="ntqstring.html#replace">replace</a>( rx, "&amp;amp;" );
+ <a href="tqstring.html">TQString</a> line1 = "This &amp; that";
+ line1.<a href="tqstring.html#replace">replace</a>( rx, "&amp;amp;" );
// line1 == "This &amp;amp; that"
- <a href="ntqstring.html">TQString</a> line2 = "His &amp;amp; hers &amp; theirs";
- line2.<a href="ntqstring.html#replace">replace</a>( rx, "&amp;amp;" );
+ <a href="tqstring.html">TQString</a> line2 = "His &amp;amp; hers &amp; theirs";
+ line2.<a href="tqstring.html#replace">replace</a>( rx, "&amp;amp;" );
// line2 == "His &amp;amp; hers &amp;amp; theirs"
</pre>
-<p> Here we've passed the TQRegExp to <a href="ntqstring.html">TQString</a>'s replace() function to
+<p> Here we've passed the TQRegExp to <a href="tqstring.html">TQString</a>'s replace() function to
replace the matched text with new text.
<p> <pre>
- <a href="ntqstring.html">TQString</a> str = "One Eric another Eirik, and an Ericsson."
+ <a href="tqstring.html">TQString</a> str = "One Eric another Eirik, and an Ericsson."
" How many Eiriks, Eric?";
TQRegExp rx( "\\b(Eric|Eirik)\\b" ); // match Eric or Eirik
int pos = 0; // where we are in the string
@@ -607,7 +607,7 @@ by non-word boundaries.
their component fields.
<p> <pre>
str = "Trolltech AS\twww.trolltech.com\tNorway";
- <a href="ntqstring.html">TQString</a> company, web, country;
+ <a href="tqstring.html">TQString</a> company, web, country;
rx.setPattern( "^([^\t]+)\t([^\t]+)\t([^\t]+)$" );
if ( rx.search( str ) != -1 ) {
company = rx.cap( 1 );
@@ -621,10 +621,10 @@ 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
-<a href="ntqstringlist.html">TQStringList</a> split() function can take a separator string or regexp
+<a href="tqstringlist.html">TQStringList</a> split() function can take a separator string or regexp
as an argument and split a string accordingly.
<p> <pre>
- <a href="ntqstringlist.html">TQStringList</a> field = TQStringList::<a href="ntqstringlist.html#split">split</a>( "\t", str );
+ <a href="tqstringlist.html">TQStringList</a> field = TQStringList::<a href="tqstringlist.html#split">split</a>( "\t", str );
</pre>
<p> Here field[0] is the company, field[1] the web address and so on.
@@ -651,7 +651,7 @@ which returns a string list of all captured strings, or using
<a href="#cap">cap</a>() which returns the captured string for the given index. The
<a href="#pos">pos</a>() function takes a match index and returns the position in the
string where the match was made (or -1 if there was no match).
-<p> <p>See also <a href="qregexpvalidator.html">TQRegExpValidator</a>, <a href="ntqstring.html">TQString</a>, <a href="ntqstringlist.html">TQStringList</a>, <a href="misc.html">Miscellaneous Classes</a>, <a href="shared.html">Implicitly and Explicitly Shared Classes</a>, and <a href="tools.html">Non-GUI Classes</a>.
+<p> <p>See also <a href="qregexpvalidator.html">TQRegExpValidator</a>, <a href="tqstring.html">TQString</a>, <a href="tqstringlist.html">TQStringList</a>, <a href="misc.html">Miscellaneous Classes</a>, <a href="shared.html">Implicitly and Explicitly Shared Classes</a>, and <a href="tools.html">Non-GUI Classes</a>.
<p> <a name="member-function-documentation"></a>
@@ -674,7 +674,7 @@ The caret never matches.
Constructs an empty regexp.
<p> <p>See also <a href="#isValid">isValid</a>() and <a href="#errorString">errorString</a>().
-<h3 class=fn><a name="TQRegExp-2"></a>TQRegExp::TQRegExp ( const&nbsp;<a href="ntqstring.html">TQString</a>&nbsp;&amp;&nbsp;pattern, bool&nbsp;caseSensitive = TRUE, bool&nbsp;wildcard = FALSE )
+<h3 class=fn><a name="TQRegExp-2"></a>TQRegExp::TQRegExp ( const&nbsp;<a href="tqstring.html">TQString</a>&nbsp;&amp;&nbsp;pattern, bool&nbsp;caseSensitive = TRUE, bool&nbsp;wildcard = FALSE )
</h3>
Constructs a <a href="ntqregexp.html#regular-expression">regular expression</a> object for the given <em>pattern</em>
string. The pattern must be given using wildcard notation if <em>wildcard</em> is TRUE (default is FALSE). The pattern is case
@@ -691,7 +691,7 @@ Constructs a <a href="ntqregexp.html#regular-expression">regular expression</a>
</h3>
Destroys the <a href="ntqregexp.html#regular-expression">regular expression</a> and cleans up its internal data.
-<h3 class=fn><a href="ntqstring.html">TQString</a> <a name="cap"></a>TQRegExp::cap ( int&nbsp;nth = 0 )
+<h3 class=fn><a href="tqstring.html">TQString</a> <a name="cap"></a>TQRegExp::cap ( int&nbsp;nth = 0 )
</h3>
Returns the text captured by the <em>nth</em> subexpression. The entire
match has index 0 and the parenthesized subexpressions have
@@ -700,8 +700,8 @@ indices starting from 1 (excluding non-capturing parentheses).
TQRegExp rxlen( "(\\d+)(?:\\s*)(cm|inch)" );
int pos = rxlen.<a href="#search">search</a>( "Length: 189cm" );
if ( pos &gt; -1 ) {
- <a href="ntqstring.html">TQString</a> value = rxlen.<a href="#cap">cap</a>( 1 ); // "189"
- <a href="ntqstring.html">TQString</a> unit = rxlen.<a href="#cap">cap</a>( 2 ); // "cm"
+ <a href="tqstring.html">TQString</a> value = rxlen.<a href="#cap">cap</a>( 1 ); // "189"
+ <a href="tqstring.html">TQString</a> unit = rxlen.<a href="#cap">cap</a>( 2 ); // "cm"
// ...
}
</pre>
@@ -717,7 +717,7 @@ determined in advance, for example:
<p> <pre>
TQRegExp rx( "(\\d+)" );
str = "Offsets: 12 14 99 231 7";
- <a href="ntqstringlist.html">TQStringList</a> list;
+ <a href="tqstringlist.html">TQStringList</a> list;
pos = 0;
while ( pos &gt;= 0 ) {
pos = rx.<a href="#search">search</a>( str, pos );
@@ -732,7 +732,7 @@ determined in advance, for example:
<p> <p>See also <a href="#capturedTexts">capturedTexts</a>(), <a href="#pos">pos</a>(), <a href="#exactMatch">exactMatch</a>(), <a href="#search">search</a>(), and <a href="#searchRev">searchRev</a>().
<p>Examples: <a href="archivesearch-example.html#x479">network/archivesearch/archivedialog.ui.h</a> and <a href="regexptester-example.html#x2485">regexptester/regexptester.cpp</a>.
-<h3 class=fn><a href="ntqstringlist.html">TQStringList</a> <a name="capturedTexts"></a>TQRegExp::capturedTexts ()
+<h3 class=fn><a href="tqstringlist.html">TQStringList</a> <a name="capturedTexts"></a>TQRegExp::capturedTexts ()
</h3>
Returns a list of the captured text strings.
<p> The first string in the list is the entire matched string. Each
@@ -742,7 +742,7 @@ subsequent list element contains a string that matched a
<pre>
TQRegExp rx( "(\\d+)(\\s*)(cm|inch(es)?)" );
int pos = rx.<a href="#search">search</a>( "Length: 36 inches" );
- <a href="ntqstringlist.html">TQStringList</a> list = rx.<a href="#capturedTexts">capturedTexts</a>();
+ <a href="tqstringlist.html">TQStringList</a> list = rx.<a href="#capturedTexts">capturedTexts</a>();
// list is now ( "36 inches", "36", " ", "inches", "es" )
</pre>
@@ -752,14 +752,14 @@ non-capturing parentheses:
<p> <pre>
TQRegExp rx( "(\\d+)(?:\\s*)(cm|inch(?:es)?)" );
int pos = rx.<a href="#search">search</a>( "Length: 36 inches" );
- <a href="ntqstringlist.html">TQStringList</a> list = rx.<a href="#capturedTexts">capturedTexts</a>();
+ <a href="tqstringlist.html">TQStringList</a> list = rx.<a href="#capturedTexts">capturedTexts</a>();
// list is now ( "36 inches", "36", "inches" )
</pre>
<p> Note that if you want to iterate over the list, you should iterate
over a copy, e.g.
<pre>
- <a href="ntqstringlist.html">TQStringList</a> list = rx.capturedTexts();
+ <a href="tqstringlist.html">TQStringList</a> list = rx.capturedTexts();
TQStringList::Iterator it = list.<a href="tqvaluelist.html#begin">begin</a>();
while( it != list.<a href="tqvaluelist.html#end">end</a>() ) {
myProcessing( *it );
@@ -788,14 +788,14 @@ Returns TRUE if case sensitivity is enabled; otherwise returns
FALSE. The default is TRUE.
<p> <p>See also <a href="#setCaseSensitive">setCaseSensitive</a>().
-<h3 class=fn><a href="ntqstring.html">TQString</a> <a name="errorString"></a>TQRegExp::errorString ()
+<h3 class=fn><a href="tqstring.html">TQString</a> <a name="errorString"></a>TQRegExp::errorString ()
</h3>
Returns a text string that explains why a regexp pattern is
invalid the case being; otherwise returns "no error occurred".
<p> <p>See also <a href="#isValid">isValid</a>().
<p>Example: <a href="regexptester-example.html#x2486">regexptester/regexptester.cpp</a>.
-<h3 class=fn><a href="ntqstring.html">TQString</a> <a name="escape"></a>TQRegExp::escape ( const&nbsp;<a href="ntqstring.html">TQString</a>&nbsp;&amp;&nbsp;str )<tt> [static]</tt>
+<h3 class=fn><a href="tqstring.html">TQString</a> <a name="escape"></a>TQRegExp::escape ( const&nbsp;<a href="tqstring.html">TQString</a>&nbsp;&amp;&nbsp;str )<tt> [static]</tt>
</h3>
Returns the string <em>str</em> with every regexp special character
escaped with a backslash. The special characters are $, (, ), *, +,
@@ -813,7 +813,7 @@ escaped with a backslash. The special characters are $, (, ), *, +,
</pre>
-<h3 class=fn>bool <a name="exactMatch"></a>TQRegExp::exactMatch ( const&nbsp;<a href="ntqstring.html">TQString</a>&nbsp;&amp;&nbsp;str ) const
+<h3 class=fn>bool <a name="exactMatch"></a>TQRegExp::exactMatch ( const&nbsp;<a href="tqstring.html">TQString</a>&nbsp;&amp;&nbsp;str ) const
</h3>
Returns TRUE if <em>str</em> is matched exactly by this <a href="ntqregexp.html#regular-expression">regular expression</a>; otherwise returns FALSE. You can determine how much of
the string was matched by calling <a href="#matchedLength">matchedLength</a>().
@@ -839,7 +839,7 @@ on <em>any</em> string it will return the start offset (0 by default)
because the empty pattern matches the 'emptiness' at the start of
the string. In this case the length of the match returned by
<a href="#matchedLength">matchedLength</a>() will be 0.
-<p> See <a href="ntqstring.html#isEmpty">TQString::isEmpty</a>().
+<p> See <a href="tqstring.html#isEmpty">TQString::isEmpty</a>().
<h3 class=fn>bool <a name="isValid"></a>TQRegExp::isValid () const
</h3>
@@ -853,7 +853,7 @@ wildcard regexp but an invalid full regexp.
<p> <p>See also <a href="#errorString">errorString</a>().
<p>Example: <a href="regexptester-example.html#x2487">regexptester/regexptester.cpp</a>.
-<h3 class=fn>int <a name="match"></a>TQRegExp::match ( const&nbsp;<a href="ntqstring.html">TQString</a>&nbsp;&amp;&nbsp;str, int&nbsp;index = 0, int&nbsp;*&nbsp;len = 0, bool&nbsp;indexIsStart = TRUE ) const
+<h3 class=fn>int <a name="match"></a>TQRegExp::match ( const&nbsp;<a href="tqstring.html">TQString</a>&nbsp;&amp;&nbsp;str, int&nbsp;index = 0, int&nbsp;*&nbsp;len = 0, bool&nbsp;indexIsStart = TRUE ) const
</h3> <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
<p> Attempts to match in <em>str</em>, starting from position <em>index</em>.
Returns the position of the match, or -1 if there was no match.
@@ -863,7 +863,7 @@ null pointer.
the string will match the start of string anchor, <b>^</b>, in the
regexp, if present. Otherwise, position 0 in <em>str</em> will match.
<p> Use <a href="#search">search</a>() and <a href="#matchedLength">matchedLength</a>() instead of this function.
-<p> <p>See also <a href="ntqstring.html#mid">TQString::mid</a>() and <a href="qconststring.html">TQConstString</a>.
+<p> <p>See also <a href="tqstring.html#mid">TQString::mid</a>() and <a href="qconststring.html">TQConstString</a>.
<p>Example: <a href="qmag-example.html#x1791">qmag/qmag.cpp</a>.
<h3 class=fn>int <a name="matchedLength"></a>TQRegExp::matchedLength () const
@@ -905,7 +905,7 @@ otherwise returns FALSE.
strings and the same settings for case sensitivity, wildcard and
minimal matching.
-<h3 class=fn><a href="ntqstring.html">TQString</a> <a name="pattern"></a>TQRegExp::pattern () const
+<h3 class=fn><a href="tqstring.html">TQString</a> <a name="pattern"></a>TQRegExp::pattern () const
</h3>
Returns the pattern string of the <a href="ntqregexp.html#regular-expression">regular expression</a>. The pattern
has either regular expression syntax or wildcard syntax, depending
@@ -931,7 +931,7 @@ of the whole match.
due to an implementation tradeoff.
<p> <p>See also <a href="#capturedTexts">capturedTexts</a>(), <a href="#exactMatch">exactMatch</a>(), <a href="#search">search</a>(), and <a href="#searchRev">searchRev</a>().
-<h3 class=fn>int <a name="search"></a>TQRegExp::search ( const&nbsp;<a href="ntqstring.html">TQString</a>&nbsp;&amp;&nbsp;str, int&nbsp;offset = 0, <a href="ntqregexp.html#CaretMode-enum">CaretMode</a>&nbsp;caretMode = CaretAtZero ) const
+<h3 class=fn>int <a name="search"></a>TQRegExp::search ( const&nbsp;<a href="tqstring.html">TQString</a>&nbsp;&amp;&nbsp;str, int&nbsp;offset = 0, <a href="ntqregexp.html#CaretMode-enum">CaretMode</a>&nbsp;caretMode = CaretAtZero ) const
</h3>
Attempts to find a match in <em>str</em> from position <em>offset</em> (0 by
default). If <em>offset</em> is -1, the search starts at the last
@@ -940,12 +940,12 @@ character; if -2, at the next to last character; etc.
match.
<p> The <em>caretMode</em> parameter can be used to instruct whether <b>^</b>
should match at index 0 or at <em>offset</em>.
-<p> You might prefer to use <a href="ntqstring.html#find">TQString::find</a>(), <a href="ntqstring.html#contains">TQString::contains</a>() or
-even <a href="ntqstringlist.html#grep">TQStringList::grep</a>(). To replace matches use
-<a href="ntqstring.html#replace">TQString::replace</a>().
+<p> You might prefer to use <a href="tqstring.html#find">TQString::find</a>(), <a href="tqstring.html#contains">TQString::contains</a>() or
+even <a href="tqstringlist.html#grep">TQStringList::grep</a>(). To replace matches use
+<a href="tqstring.html#replace">TQString::replace</a>().
<p> Example:
<pre>
- <a href="ntqstring.html">TQString</a> str = "offsets: 1.23 .50 71.00 6.00";
+ <a href="tqstring.html">TQString</a> str = "offsets: 1.23 .50 71.00 6.00";
TQRegExp rx( "\\d*\\.\\d+" ); // primitive floating point matching
int count = 0;
int pos = 0;
@@ -961,7 +961,7 @@ even <a href="ntqstringlist.html#grep">TQStringList::grep</a>(). To replace matc
<p> <p>See also <a href="#searchRev">searchRev</a>() and <a href="#exactMatch">exactMatch</a>().
<p>Examples: <a href="archivesearch-example.html#x481">network/archivesearch/archivedialog.ui.h</a> and <a href="regexptester-example.html#x2490">regexptester/regexptester.cpp</a>.
-<h3 class=fn>int <a name="searchRev"></a>TQRegExp::searchRev ( const&nbsp;<a href="ntqstring.html">TQString</a>&nbsp;&amp;&nbsp;str, int&nbsp;offset = -1, <a href="ntqregexp.html#CaretMode-enum">CaretMode</a>&nbsp;caretMode = CaretAtZero ) const
+<h3 class=fn>int <a name="searchRev"></a>TQRegExp::searchRev ( const&nbsp;<a href="tqstring.html">TQString</a>&nbsp;&amp;&nbsp;str, int&nbsp;offset = -1, <a href="ntqregexp.html#CaretMode-enum">CaretMode</a>&nbsp;caretMode = CaretAtZero ) const
</h3>
Attempts to find a match backwards in <em>str</em> from position <em>offset</em>. If <em>offset</em> is -1 (the default), the search starts at the
last character; if -2, at the next to last character; etc.
@@ -1000,7 +1000,7 @@ nested tags.
<p> <p>See also <a href="#minimal">minimal</a>().
<p>Examples: <a href="archivesearch-example.html#x482">network/archivesearch/archivedialog.ui.h</a> and <a href="regexptester-example.html#x2492">regexptester/regexptester.cpp</a>.
-<h3 class=fn>void <a name="setPattern"></a>TQRegExp::setPattern ( const&nbsp;<a href="ntqstring.html">TQString</a>&nbsp;&amp;&nbsp;pattern )
+<h3 class=fn>void <a name="setPattern"></a>TQRegExp::setPattern ( const&nbsp;<a href="tqstring.html">TQString</a>&nbsp;&amp;&nbsp;pattern )
</h3>
Sets the pattern string to <em>pattern</em>. The case sensitivity,
wildcard and minimal matching options are not changed.