in reply to Re: Work-around for variable length look-behind?
in thread Work-around for variable length look-behind?

Does that take care of the "in front of an 'a'" requirement? I like it, just trying to figure out what it does?
  • Comment on Re^2: Work-around for variable length look-behind?

Replies are listed 'Best First'.
Re^3: Work-around for variable length look-behind?
by BrowserUk (Patriarch) on Oct 11, 2010 at 11:17 UTC
    Does that take care of the "in front of an 'a'" requirement?

    Er, no. I missed that bit of the spec, but it is easily corrected:

    $s = 'bbaaccbab sdbcbalsbadcbnw';; ## with added bs ($t = $s) =~ s[(b)(?=a[^\s]+$)][B]g; print $t;; bbaaccbab sdbcBalsBadcbnw

    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.