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 .. @captures < $max ? $#captures : $max -1 ] 
    +];
    }
    
  2. or download this
    sub _browseruk_recognize_limited_urls {
       my ($input, $max) = @_;
    ...
       $#captures = $max -1 if @captures >= $max; ## Adjust size if necess
    +ary
       return \@captures.
     }