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

On Wed, Feb 4, 2009 at 10:49 PM, Yitzchak Scott-Thoennes
<[email protected]> 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
> [email protected]
> http://perl.org.il/mailman/listinfo/perl
>



-- 
Gaal Yahas <[email protected]>
http://gaal.livejournal.com/
_______________________________________________
Perl mailing list
[email protected]
http://perl.org.il/mailman/listinfo/perl

Reply via email to