Help for this page

Select Code to Download


  1. or download this
    while ( $text =~ m!(^\s+\.com)!gi; ) { # the "g" tells Perl that this 
    +can work as a loop!
    
       print $1; # or whatever you want to do with the captured link.
    
    }
    
  2. or download this
    $text =~ /a href="(.*?)"/gi; # The ? modifier after another modifier t
    +ells perl not to be greedy in the *, stopping, here, before the first
    + \" (instead of swallowing all the string as it would with "."