Help for this page

Select Code to Download


  1. or download this
    # Validate these subexpressions before putting in main regex.
    my $pre_re = qr{blah};
    ...
    my $post_re = qr{bizbaz};
    
    while ($data =~ /$pre_re($body_re)$post_re/) {
    
  2. or download this
    my @array = qw(foo bar biz);
    
    ...
    my $list = join '|', map {quotemeta} @array;
    
    while ($data =~ /($list)/) {