[Israel.pm] (no subject)

Gaal Yahas gaal at forum2.org
Wed Feb 4 13:52:15 PST 2009


Ah, good point about \\\'. Too long since I did real Perl hacking :-(

On Wed, Feb 4, 2009 at 10:49 PM, Yitzchak Scott-Thoennes
<sthoenna at efn.org> wrote:
> 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
>
>
> _______________________________________________
> Perl mailing list
> Perl at perl.org.il
> http://perl.org.il/mailman/listinfo/perl
>



-- 
Gaal Yahas <gaal at forum2.org>
http://gaal.livejournal.com/



More information about the Perl mailing list