On Thu, 14 Dec 2000, Jeff Pinyan wrote:

> You could use my sexeger technique to get this behavior (possibly):
> 
>   $string = "aaabbbcccdddeee";
>   # regex to be reversed: /b(.*?)d/
>   $revstr = reverse $string;
>   ($match) = $revstr =~ /d(.*?)b/;
> 
> No, that doesn't quite work.  It works when you unroll the .*? loop:
> 
>   # regex to be reversed: /b([^bd]*)d/
>   ($match) = $revstr =~ /d([^bd]*)b/;
> 
> But then why would you use sexeger at all, when you can unroll the loop in
> the forward direction?
> 
>   ($match) = $string =~ /b([^bd]*)d/;

I'm not asking for help with workarounds.  If I ever need to workaround the
current behavior, I won't have any trouble doing so.  It's just that (on a
philosophical note) I don't believe this is something that should require a
workaround.  Obviously, others disagree.

Deven

Reply via email to