summaryrefslogtreecommitdiff
path: root/help/en/html/help/qregexp.html
Side-by-side diff
Diffstat (limited to 'help/en/html/help/qregexp.html') (more/less context) (ignore whitespace changes)
-rw-r--r--help/en/html/help/qregexp.html75
1 files changed, 75 insertions, 0 deletions
diff --git a/help/en/html/help/qregexp.html b/help/en/html/help/qregexp.html
new file mode 100644
index 0000000..f2dc0a3
--- a/dev/null
+++ b/help/en/html/help/qregexp.html
@@ -0,0 +1,75 @@
+<html><head><title>Pattern Matching</title></head><body>
+<h1>Pattern Matching</h1>
+Opie provides pattern matching using
+<a href="#regexp">regular expressions</a>
+or <a href="#wildcards">wildcards</a>.<br>
+It supports <a href="#general">unicode</a> and
+<a href="#general">character sets</a>.
+<p>
+<h2><a name="regexp"></a>Regular Expressions</h2>
+Regular Expressions knows these primitives:
+<ul plain>
+<li><dfn>c</dfn> matches the character 'c'
+<li><dfn>.</dfn> matches any character
+<li><dfn>^</dfn> matches start of input
+<li><dfn>$</dfn> matches end of input
+<li><dfn>[]</dfn> matches a defined set of characters - see below.
+<li><dfn>a*</dfn> matches a sequence of zero or more a's
+<li><dfn>a+</dfn> matches a sequence of one or more a's
+<li><dfn>a?</dfn> matches an optional a
+<li><dfn>\c</dfn> escape code for matching special characters such
+as \, [, *, +, . etc.
+<li><dfn>\t</dfn> matches the TAB character (9)
+<li><dfn>\n</dfn> matches newline (10)
+<li><dfn>\r</dfn> matches return (13)
+<li><dfn>\s</dfn> matches a white space (defined as any character
+for which QChar::isSpace() returns TRUE. This includes at least
+ASCII characters 9 (TAB), 10 (LF), 11 (VT), 12(FF), 13 (CR) and 32
+(Space)).
+<li><dfn>\d</dfn> matches a digit (defined as any character for
+which QChar::isDigit() returns TRUE. This includes at least ASCII
+characters '0'-'9').
+<li><dfn>\x1f6b</dfn> matches the character with unicode point U1f6b
+(hexadecimal 1f6b). \x0012 will match the ASCII/Latin1 character
+0x12 (18 decimal, 12 hexadecimal).
+<li><dfn>\022</dfn> matches the ASCII/Latin1 character 022 (18
+decimal, 22 octal).
+</ul>
+<h2><a name="wildcards"></a>wildcard mode</h2>
+<p>In wildcard mode, it only knows four primitives:
+<ul plain>
+<li><dfn>c</dfn> matches the character 'c'
+<li><dfn>?</dfn> matches any character
+<li><dfn>*</dfn> matches any sequence of characters
+<li><dfn>[]</dfn> matches a defined set of characters - see below.
+</ul>
+<h2><a name="general">General</a></h2>
+<p>It supports Unicode both in the pattern strings and in the
+strings to be matched.
+<p>A character set matches a defined set of characters. For example,
+[BSD] matches any of 'B', 'D' and 'S'. Within a character set, the
+special characters '.', '*', '?', '^', '$', '+' and '[' lose their
+special meanings. The following special characters apply:
+<ul plain>
+<li><dfn>^</dfn> When placed first in the list, changes the
+character set to match any character <em>not</em> in the list. To include
+the character '^' itself in the set, escape it or place it anywhere
+but first.
+<li><dfn>-</dfn> Defines a range of characters. To include the
+character '-' itself in the set, escape it or place it last.
+<li><dfn>]</dfn> Ends the character set definition. To include the
+character ']' itself in the set, escape it or place it first (but
+after the negation operator '^', if present)
+</ul>
+Thus, [a-zA-Z0-9.] matches upper and lower case ASCII letters,
+digits and dot; and [^\s] matches everything except white space.
+<p>Bugs and limitations:
+<ul>
+<li>Case insensitive matching is not supported for non-ASCII/Latin1
+(non-8bit) characters.
+</ul>
+ <br><br>
+ Taken from the Qt Documentation.<br>
+ This file is part of the Qt toolkit,
+ copyright © 1995-2001 Trolltech, all rights reserved.
+</body></html>