In MatchĀ§
See primary documentation in context for method replace-with
multi method replace-with(Match: Str() --> Str)
Returns the invocant string where the Match
object is replaced by $replacement
.
my Str = "Some foo";my Match = .match(/foo/);my = .replace-with("string"); # Ā«Some stringĀ»