On Fri, May 23, 2014 at 03:08:38PM -0400, Peter Schwenn wrote:
> Still it would be more straightforward to have something like
>      $layn ~~ s:g/ (\W) [[RMA\.]? OpenNURBS\.]? I? On (<[2..4]>) dPoint
> /$0Rhino.Geometry.Point$1d/;
> and have a more perl6-built-in way of getting hold of the /replacement/ and
> the count.

If it's :g, then wouldn't it be "replacement*s*"?

The real question to me is whether this is a common enough use case to
warrant the overhead of saving the replacement string(s) for every
s// , or if doing it via closure is sufficient (if a little ugly, but
IMO it's okay for rare to be a little ugly if it means common remains
fast(er) :).


Reply via email to