author | mickeyl <mickeyl> | 2003-10-29 22:07:36 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-10-29 22:07:36 (UTC) |
commit | d53637f46cf217fc760d7aac58b4596843a73803 (patch) (unidiff) | |
tree | 25289be556fa1ce0ba8539b7f42aeaa037bdf7fd /help/en/html/help/qregexp.html | |
parent | 1af1f1d9f398d38a2bc666cd2edff5725da7a770 (diff) | |
download | opie-d53637f46cf217fc760d7aac58b4596843a73803.zip opie-d53637f46cf217fc760d7aac58b4596843a73803.tar.gz opie-d53637f46cf217fc760d7aac58b4596843a73803.tar.bz2 |
merge development/* and help/*
Diffstat (limited to 'help/en/html/help/qregexp.html') (more/less context) (ignore whitespace changes)
-rw-r--r-- | help/en/html/help/qregexp.html | 75 |
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> | ||
3 | Opie provides pattern matching using | ||
4 | <a href="#regexp">regular expressions</a> | ||
5 | or <a href="#wildcards">wildcards</a>.<br> | ||
6 | It 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> | ||
10 | Regular 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 | ||
21 | as \, [, *, +, . 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 | ||
26 | for which QChar::isSpace() returns TRUE. This includes at least | ||
27 | ASCII 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 | ||
30 | which QChar::isDigit() returns TRUE. This includes at least ASCII | ||
31 | characters '0'-'9'). | ||
32 | <li><dfn>\x1f6b</dfn> matches the character with unicode point U1f6b | ||
33 | (hexadecimal 1f6b). \x0012 will match the ASCII/Latin1 character | ||
34 | 0x12 (18 decimal, 12 hexadecimal). | ||
35 | <li><dfn>\022</dfn> matches the ASCII/Latin1 character 022 (18 | ||
36 | decimal, 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 | ||
48 | strings 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 | ||
51 | special characters '.', '*', '?', '^', '$', '+' and '[' lose their | ||
52 | special meanings. The following special characters apply: | ||
53 | <ul plain> | ||
54 | <li><dfn>^</dfn> When placed first in the list, changes the | ||
55 | character set to match any character <em>not</em> in the list. To include | ||
56 | the character '^' itself in the set, escape it or place it anywhere | ||
57 | but first. | ||
58 | <li><dfn>-</dfn> Defines a range of characters. To include the | ||
59 | character '-' itself in the set, escape it or place it last. | ||
60 | <li><dfn>]</dfn> Ends the character set definition. To include the | ||
61 | character ']' itself in the set, escape it or place it first (but | ||
62 | after the negation operator '^', if present) | ||
63 | </ul> | ||
64 | Thus, [a-zA-Z0-9.] matches upper and lower case ASCII letters, | ||
65 | digits 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> | ||