in reply to Match whitespace or start-of-string with lookbehind

I am not quite sure of what you are asking but here is something that I think is functionally equivalent to what you are showing doing:
$text =~ s/(^|\s)"(?=\w)/$1“/gs;
In short I am just changing the variable length lookbehind assertion and making it a regular captured pattern and putting it back after the match.

HTH

-enlil

Replies are listed 'Best First'.
Re^2: Match whitespace or start-of-string with lookbehind
by BigLug (Chaplain) on Aug 24, 2004 at 02:58 UTC
    Yeah, that works. I just hate capturing something just to stick it back in the same place later!
    If this is a root node: Before responding, please ensure your clue bit is set.
    If this is a reply: This is a discussion group, not a helpdesk ... If the discussion happens to answer a question you've asked, that's incidental.