Help for this page

Select Code to Download


  1. or download this
    # Extract all numbers and whitespace including punctuation frequently 
    +significant to numbers
    my $numbers = join ' ', $str =~ /([\d .-+]+)/g;
    
    # Less whitespace
    $numbers =~ s/(\s)\1+/$1/g;