$text =~ s/(^|(?<=\s))"(?=\w)/“/gs; #### ------------ :Wq Not an editor command: Wq