Example 2: W3
- From UAX#9:
- W3: change all ALs to R.
- Actual code:
s/$AL/$R/g;
- Details:
s/foo/bar/
: Substitution
$AL
, $R
: Variables containing single letters:
used as macros for character types
g
: Global substitution: substitute not only once, but as
many times as you can