BigLug has asked for the wisdom of the Perl Monks concerning the following question:
However because ^ is zero-width and \s isn't, I get an error about variable width lookbehind not being supported.$text =~ s/(?<=(^|\s))"(?=\w)/“/gs;
How do I do this? Or will I need to use two regexes for this?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Match whitespace or start-of-string with lookbehind
by Enlil (Parson) on Aug 24, 2004 at 02:54 UTC | |
by BigLug (Chaplain) on Aug 24, 2004 at 02:58 UTC | |
|
Re: Match whitespace or start-of-string with lookbehind
by etcshadow (Priest) on Aug 24, 2004 at 03:50 UTC | |
|
Re: Match whitespace or start-of-string with lookbehind
by ysth (Canon) on Aug 24, 2004 at 05:07 UTC | |
|
Re: Match whitespace or start-of-string with lookbehind
by Your Mother (Archbishop) on Aug 24, 2004 at 06:28 UTC | |
|
Re: Match whitespace or start-of-string with lookbehind
by diotalevi (Canon) on Aug 24, 2004 at 13:35 UTC |