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

Re: Apply A Set Of Regexes To A String

by tmoertel (Chaplain)
on Oct 11, 2004 at 05:37 UTC ( #398100=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        body:
            +all_pages
    ...
    
        all_pages:
            s/::PAGENUM::/$page_number/eg;
    
  2. or download this
        my $page_engine = make_regex_engine_from_spec( $spec_fh );
        my $page_number = 1;
    ...
            print $page_engine->( @$page{'content','page_type'} ), "\n";
            $page_number++;
        }
    
  3. or download this
        sub make_regex_engine_from_spec
        {
    ...
            }
        }
        
    
  4. or download this
    my @book_pages = (
    
    ...
       { page_type => 'index', 
         content   => "This an index page (::PAGENUM::).\n" },
    );
    
  5. or download this
        This is the copyright page (i).
        Copyright 2004 blah, blah
    ...
    
        This an index page (3).
        
    
  6. or download this
    #!/usr/bin/perl
    
    ...
    
    all_pages:
        s/::PAGENUM::/$page_number/eg;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (11)
As of 2014-08-28 05:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (257 votes), past polls