[pcre-dev] Remove some restrictions of lookbehind assertions

Góra strony
Delete this message
Autor: ND
Data:  
Dla: Pcre-dev
Temat: [pcre-dev] Remove some restrictions of lookbehind assertions

Good day!


Can we think about removing not all but many restrictions of lookbehind
assertions?

If lookbehind of nonfixed length (?<=X) or (?<!X) happens at subject
position p, then pcre can do auxiliary match:
/(?:X)\z/ or /\A.*(?:X)\z/
subject[0;p-1] (part of subject from pos 0 to pos p-1)

Result of this auxiliary match may be result of lookbehind.
May be it not quite effective and still have restrictions but is useful.

Is it simple to add such functionality?