in reply to Re: how to search and replace the match with specific number of times in a stringin thread how to search and replace the match with specific number of times in a string
s/\s+/ / for 1 .. 3; [download]