[Israel.pm] (no subject)

Yitzchak Scott-Thoennes sthoenna at efn.org
Wed Feb 4 12:49:17 PST 2009


On Wed, February 4, 2009 10:50 am, Gaal Yahas wrote:
> Removing all \' won't work, because \\' can mean
> "literal backslash and then real quote end". So you need something
> called negative look-behind assertion, thus:
>
> /(?<!\\)\\'/

That fails on \\\'.  Since perl doesn't support variable width
look-behind, there is in fact no way to correctly use look-behind for
this.
You can only parse forwards, like:

    /\G'(?:[^\\']+|\\.)+'/s





More information about the Perl mailing list