Help for this page

Select Code to Download


  1. or download this
     
    my $line='0x160001a \"fubar - BlahBlahBlah - Blah Blah (1:23)\": ("Foo
    +" "Bar")  Baz';
    if ($line=~/\)/){
    ...
    if ($line=~/-\s/){
       $line=$';
    }
    
  2. or download this
    use strict;
    use warnings;
    ...
    print $prematch,$/;
    print $postmatch,$/;
    print $line,$/;
    
  3. or download this
    use strict;
    use warnings;
    ...
    my $line='0x160001a \"fubar - BlahBlahBlah - Blah Blah (1:23)\": ("Foo
    +" "Bar")  Baz';
    
    if ( $line =~ /- ([^\)]+\))/ ) {  print $1; $line = $1;}