my $i = ''; (my $string = $input) =~ s/(^|\+)/($i++&&'&')."keyword$i="/ge;