Thread was bedeutet dieser RegEx (6 answers)
Opened by Peddn at 2005-03-31 11:46

pq
 2005-03-31 12:16
#10181 #10181
User since
2003-08-04
12208 Artikel
Admin1
[Homepage]
user image
also (bezüglich perl), das sagt CPAN:YAPE::Regex::Explain:
Code: (dl )
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
(?i-msx:\bBug {0,1}(\d+):)

matches as follows:
 
NODE                     EXPLANATION
----------------------------------------------------------------------
(?i-msx:                 group, but do not capture (case-insensitive)
                        (with ^ and $ matching normally) (with . not
                        matching \n) (matching whitespace and #
                        normally):
----------------------------------------------------------------------
 \b                       the boundary between a word char (\w) and
                          something that is not a word char
----------------------------------------------------------------------
 Bug                      'Bug'
----------------------------------------------------------------------
  {0,1}                   ' ' (between 0 and 1 times (matching the
                          most amount possible))
----------------------------------------------------------------------
 (                        group and capture to \1:
----------------------------------------------------------------------
   \d+                      digits (0-9) (1 or more times (matching
                            the most amount possible))
----------------------------------------------------------------------
 )                        end of \1
----------------------------------------------------------------------
 :                        ':'
----------------------------------------------------------------------
)                        end of grouping
----------------------------------------------------------------------
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: Wiki:Wie frage ich & perlintro Wiki:brian's Leitfaden für jedes Perl-Problem

View full thread was bedeutet dieser RegEx