s/ '(.*)'(\W)/ "$1"$2/; # note the greedy use of ".*"