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
In reply to Re^3: Work-around for variable length look-behind?
by BrowserUk
in thread Work-around for variable length look-behind?
by pat_mc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |