--- In [email protected], "brucexs" <[EMAIL PROTECTED]> wrote:
>
> --- In [email protected], "swzoh" <seanzoh@> wrote:
> >
> > Hi Bruce,
> > 
> > There is a problem when replace pattern is null string:
> > 
> > win.debug("ab0cd1".replaceg(?"\d",""))
> > 
> > which should be abcd, but produced ab0cd1.
> 
> I uploaded a fix for this into a new release candidate.  Could you 
> please download pwrpro47.zip and make sure it works as expected for 
> you?

Yes, it works well now. Thanks.

> > 
> > And,
> > 
> > win.debug("ab0cd1".matchg(?"\d",?""))
> > 
> > which should be null IMHO, but produced 01.
> >
> 
> I agree that this seems to be what one should expect from regex 
> plugin.  However, it is pretty obscure usage for match and so, in the 
> interests of changing the least possible, I left this situation as is.
>

Although I agree that no one would use the above usage in his/her
right mind, the problem is that the following two produce different
results:

win.debug("ab0cd1".matchg(?"\d", ""))
win.debug(matchg("ab0cd1",?"\d", ""))

Sean

Reply via email to