-
Notifications
You must be signed in to change notification settings - Fork 287
Open
Labels
docsDocumentation issue (primary issue type)Documentation issue (primary issue type)
Milestone
Description
In real-world text processing problems (including one-liners), it's not uncommon that one wants to apply several substitution regexes one after another, transforming the input text one step at a time. The docs (probably a new subsection at the bottom of language/regexes#Substitution) should expressly show a few ways to do that.
One such way could be
for lines() -> $_ is copy {
s/a1/a2/;
s/b1/B1;
.say
}
I could write the text myself this week, but it would be good to first hear what are the "best" ways to accomplish that. (I do think that's fitting in the reference doc on regexes, because for each regex substitution operator it is of inherent interest if and how one can chain it.)
Metadata
Metadata
Assignees
Labels
docsDocumentation issue (primary issue type)Documentation issue (primary issue type)