--- In [email protected], Julien Pierrehumbert <[EMAIL PROTECTED]> 
wrote:
>
> > win.debug("@[EMAIL PROTECTED]"[?"(?<=^@)."]) also incorrectly returns a & b.
> > 
> > ^ looks like always reset after previous match (which seems 
> > truncated).
> 
> Indeed, this is how the *g services work.
> This is not a bug actually but rather a documented limitation.
> 
> Fixing that particular problem should be easy with clever use of
> REG_NOTBOL (specifies that first character of the subject string is not
> the beginning of a line) but that's not a general solution and I don't
> think it should be implemented.
> 
> If you can think of a practical way to fix this behaviour that doesn't
> involve rewriting PCRE or parsing the expressions without the help of
> PCRE, please tell me.
> If you know of an open-source (and preferably well-documented)
> implementation of PCRE that doesn't break lookbehinds and such when you
> use the gloal switch, again, please tell me.
> Note that I'd rather not rely on features of a specific library and
keep 
> the plugin somewhat compatible with other regex flavours, which is
why I 
> continued to use the POSIX interface after switching to PCRE.
> 
> The only way to deal with that stuff, so far as I know, would be to add
> the part of the string that's already been consumed to the expression
> and to discard it from the result. Downsides include:
> -I would need to parse the string in order to make sure no part of it
> has special meaning in PCRE... is there an easy way to do that? Parsing
> and escaping large strings in such a fashion would degrade performance
> anyway.
> -Padding the expression after the first match would waste a lot of
> memory (and slow things down of course) when processing large strings
> and might possibly make the processing of very large strings
unpractical.
>

I see. Then, I'll be careful using ^ in lookbehinds.

Sean





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/XISQkA/lOaOAA/yQLSAA/JV_rlB/TM
--------------------------------------------------------------------~-> 

Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to