Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

A demanding parser

by gmax (Abbot)
on Jan 25, 2002 at 14:58 UTC ( #141468=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    [Event "Botvinnik Memorial"]
    [Site "Moscow"]
    ...
    comment} (16. Nd4 {nested comment}) 16... axb5 17. Nd4 (17. Qc5 c6 18.
    + 
    Nd4 Ra6 19. f4 g6 20. Ra3 Qd7 21. Rfa1 Rfa8) 17... Qe8 18. f4 c5 19. 
    Nxe6 the end 1/2-1/2
    
  2. or download this
    $game = 
    { 'Event' => 'Botvinnik Memorial',
    ...
         '19w' => 'the end'
        }
    }
    
  3. or download this
    my %switchcolor = ( 'w' => 'b', 'b' => 'w');
    my @gamechars = split //, $gametext;
    ...
    # "{" => "}", "(" =>")", "[" => "]"
    # in \@array, starting at $pos
    }
    
  4. or download this
    while (<>) {
        chomp;
    ...
           m/ \G( [^\w\d]+ )/gcx && do { print "other:  $1\n"; redo; };
        }
    }
    
  5. or download this
    while (m/$REmove|$REnumber|$REcomment|$REeolcomment/g) {
        print $1;
    }
    
  6. or download this
    package PGNParser; # temporary name
    use FileHandle;
    ...
            };
        }
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://141468]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2014-09-20 04:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (153 votes), past polls