in reply to Match whitespace or start-of-string with lookbehind
If not, you can just re-nest the look-behind and the alternation into:
That works. They key is that the ^ doesn't have to be look-behind, since it's zero-width, anyway.$text =~ s/(^|(?<=\s))"(?=\w)/“/gs;
------------ :Wq Not an editor command: Wq
|
|---|