RosettaCodeData/Task/String-interpolation-included-/Ed/string-interpolation-includ...

10 lines
138 B
Plaintext

# by Artyom Bologov
H
,p
# Add a vertical bar to separate the template and value
2s/^/|/
,j
# Replace and print
s/X\(.*\)|\(.*\)/\2\1/p
Q