Help for this page

Select Code to Download


  1. or download this
    sub _browseruk_recognize_limited_urls {
      my ($input, $max) = @_;
      my @captures = $input =~ m[(https?://.+?)(?:,(?=http)|$)]g; 
      return [ @captures[ 0 .. $max-1 ] ];
    }
    
  2. or download this
    capture.t .. 
    not ok 1 - 1 URL
    ...
    
    shell returned 1
    
  3. or download this
    sub _browseruk_recognize_limited_urls {
      my ($input, $max) = @_;
      my @captures = $input =~ m[(https?://.+?)(?:,(?=http)|$)]g; 
      return [ grep { defined($_) } @captures[ 0 .. $max-1 ] ];
    }