Leser: 1
|< 1 2 >| | 20 Einträge, 2 Seiten |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
C:\>perl -MYAPE::Regex::Explain -e "print YAPE::Regex::Explain->new( '^[a-z]{3,10}\s*(?:\w{3,7}?\:\/\/[\w\-\.\/]*)??\/[\w\-\.\/~%@&=+$,;]*(?:\?[\S]*)??\s*http\/\d\.\d$')->explain"
The regular expression:
(?-imsx:^[a-z]{3,10}\s*(?:\w{3,7}?\:\/\/[\w\-\.\/]*)??\/[\w\-\.\/~%@&=+$,;]*(?:\?[\S]*)??\s*http\/\d\.\d$)
matches as follows:
NODE EXPLANATION
----------------------------------------------------------------------
(?-imsx: group, but do not capture (case-sensitive)
(with ^ and $ matching normally) (with . not
matching \n) (matching whitespace and #
normally):
----------------------------------------------------------------------
^ the beginning of the string
----------------------------------------------------------------------
[a-z]{3,10} any character of: 'a' to 'z' (between 3
and 10 times (matching the most amount
possible))
----------------------------------------------------------------------
\s* whitespace (\n, \r, \t, \f, and " ") (0 or
more times (matching the most amount
possible))
----------------------------------------------------------------------
(?: group, but do not capture (optional
(matching the least amount possible)):
----------------------------------------------------------------------
\w{3,7}? word characters (a-z, A-Z, 0-9, _)
(between 3 and 7 times (matching the
least amount possible))
----------------------------------------------------------------------
\: ':'
----------------------------------------------------------------------
\/ '/'
----------------------------------------------------------------------
\/ '/'
----------------------------------------------------------------------
[\w\-\.\/]* any character of: word characters (a-z,
A-Z, 0-9, _), '\-', '\.', '\/' (0 or
more times (matching the most amount
possible))
----------------------------------------------------------------------
)?? end of grouping
----------------------------------------------------------------------
\/ '/'
----------------------------------------------------------------------
[\w\-\.\/~%@&=+$,;]* any character of: word characters (a-z, A-
Z, 0-9, _), '\-', '\.', '\/', '~', '%',
'@', '&', '=', '+', '$', ',', ';' (0 or
more times (matching the most amount
possible))
----------------------------------------------------------------------
(?: group, but do not capture (optional
(matching the least amount possible)):
----------------------------------------------------------------------
\? '?'
----------------------------------------------------------------------
[\S]* any character of: non-whitespace (all
but \n, \r, \t, \f, and " ") (0 or more
times (matching the most amount
possible))
----------------------------------------------------------------------
)?? end of grouping
----------------------------------------------------------------------
\s* whitespace (\n, \r, \t, \f, and " ") (0 or
more times (matching the most amount
possible))
----------------------------------------------------------------------
http 'http'
----------------------------------------------------------------------
\/ '/'
----------------------------------------------------------------------
\d digits (0-9)
----------------------------------------------------------------------
\. '.'
----------------------------------------------------------------------
\d digits (0-9)
----------------------------------------------------------------------
$ before an optional \n, and the end of the
string
----------------------------------------------------------------------
) end of grouping
----------------------------------------------------------------------
renee+2008-06-23 11:29:33--Code: (dl )\w{3,7}? word characters (a-z, A-Z, 0-9, _)
QuoteKommt doch auch noch darauf an, ob es UTF ist oder welche locales verwendet werden, oder?Das ist bei Textstrings schlichtweg falsch. Da umfass \w deutlich mehr.
GwenDragon+2008-06-23 13:18:11--QuoteKommt doch auch noch darauf an, ob es UTF ist oder welche locales verwendet werden, oder?Das ist bei Textstrings schlichtweg falsch. Da umfass \w deutlich mehr.
renee+2008-06-23 12:02:56--
|< 1 2 >| | 20 Einträge, 2 Seiten |