Help for this page

Select Code to Download


  1. or download this
    my $string = "name+C.+city+loc.+loc2+++++++++++++++++++++++++B+++v+G++
    ++";
    $string =~ s/\+(?!\+)|\+{3,}.*$/ /g;
    print $string, "\n";
    
  2. or download this
    my @fields = split /\+/, $string, 6;
    
  3. or download this
    my $parsed = join " ",(split /\+/, $string, 6)[0..4];