Re: [pcre-dev] [Bug 1694] Backward search

Top Page
Delete this message
Author: ND
Date:  
To: Pcre-dev
Subject: Re: [pcre-dev] [Bug 1694] Backward search
On 2015-10-01 18:36, admin wrote:
> https://bugs.exim.org/show_bug.cgi?id=1694
>--- Comment #3 from Behdad Esfahbod <exim@???> ---
> Thanks Philip.
>One major problem we face is that eventually we want to allow multi-line
> regex
> search.
>I was thinking, perhaps something along these lines is possible:
> 1. add a function that compiles the reverse of a given regex,
> 2. possibly have a mode that would reverse the input before matching,
>But thinking about it more, it gets really complicated around handling
> Unicode
> properly.
>


May be you can use callouts with pattern like .*P(?C1)
In callout 1 you can doing needed things with last occurrence of searched
string and return 1 to find previous occurence.