summaryrefslogtreecommitdiff
path: root/help/en/html/help/qregexp.html
Unidiff
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 @@
1<html><head><title>Pattern Matching</title></head><body>
2<h1>Pattern Matching</h1>
3Opie provides pattern matching using
4<a href="#regexp">regular expressions</a>
5or <a href="#wildcards">wildcards</a>.<br>
6It supports <a href="#general">unicode</a> and
7<a href="#general">character sets</a>.
8<p>
9<h2><a name="regexp"></a>Regular Expressions</h2>
10Regular Expressions knows these primitives:
11<ul plain>
12<li><dfn>c</dfn> matches the character 'c'
13<li><dfn>.</dfn> matches any character
14<li><dfn>^</dfn> matches start of input
15<li><dfn>$</dfn> matches end of input
16<li><dfn>[]</dfn> matches a defined set of characters - see below.
17<li><dfn>a*</dfn> matches a sequence of zero or more a's
18<li><dfn>a+</dfn> matches a sequence of one or more a's
19<li><dfn>a?</dfn> matches an optional a
20<li><dfn>\c</dfn> escape code for matching special characters such
21as \, [, *, +, . etc.
22<li><dfn>\t</dfn> matches the TAB character (9)
23<li><dfn>\n</dfn> matches newline (10)
24<li><dfn>\r</dfn> matches return (13)
25<li><dfn>\s</dfn> matches a white space (defined as any character
26for which QChar::isSpace() returns TRUE. This includes at least
27ASCII characters 9 (TAB), 10 (LF), 11 (VT), 12(FF), 13 (CR) and 32
28(Space)).
29<li><dfn>\d</dfn> matches a digit (defined as any character for
30which QChar::isDigit() returns TRUE. This includes at least ASCII
31characters '0'-'9').
32<li><dfn>\x1f6b</dfn> matches the character with unicode point U1f6b
33(hexadecimal 1f6b). \x0012 will match the ASCII/Latin1 character
340x12 (18 decimal, 12 hexadecimal).
35<li><dfn>\022</dfn> matches the ASCII/Latin1 character 022 (18
36decimal, 22 octal).
37</ul>
38<h2><a name="wildcards"></a>wildcard mode</h2>
39<p>In wildcard mode, it only knows four primitives:
40<ul plain>
41<li><dfn>c</dfn> matches the character 'c'
42<li><dfn>?</dfn> matches any character
43<li><dfn>*</dfn> matches any sequence of characters
44<li><dfn>[]</dfn> matches a defined set of characters - see below.
45</ul>
46<h2><a name="general">General</a></h2>
47<p>It supports Unicode both in the pattern strings and in the
48strings to be matched.
49<p>A character set matches a defined set of characters. For example,
50[BSD] matches any of 'B', 'D' and 'S'. Within a character set, the
51special characters '.', '*', '?', '^', '$', '+' and '[' lose their
52special meanings. The following special characters apply:
53<ul plain>
54<li><dfn>^</dfn> When placed first in the list, changes the
55character set to match any character <em>not</em> in the list. To include
56the character '^' itself in the set, escape it or place it anywhere
57but first.
58<li><dfn>-</dfn> Defines a range of characters. To include the
59character '-' itself in the set, escape it or place it last.
60<li><dfn>]</dfn> Ends the character set definition. To include the
61character ']' itself in the set, escape it or place it first (but
62after the negation operator '^', if present)
63</ul>
64Thus, [a-zA-Z0-9.] matches upper and lower case ASCII letters,
65digits and dot; and [^\s] matches everything except white space.
66<p>Bugs and limitations:
67<ul>
68<li>Case insensitive matching is not supported for non-ASCII/Latin1
69(non-8bit) characters.
70</ul>
71 <br><br>
72 Taken from the Qt Documentation.<br>
73 This file is part of the Qt toolkit,
74 copyright © 1995-2001 Trolltech, all rights reserved.
75</body></html>