Add a prefix and a suffix to a string #647
-
How can one simply add a prefix and a suffix to a string, using I am trying something like
for adding a |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
The following works:
But, I can't seem to make a single call out of it... 🤷🏼 |
Beta Was this translation helpful? Give feedback.
-
What about using regex syntax Running |
Beta Was this translation helpful? Give feedback.
-
@NikosAlexandris can you show some sample input and desired output? At present I think you can do |
Beta Was this translation helpful? Give feedback.
What about using regex syntax
Running
echo 'a=hello' | mlr put -S '$a=sub($a,"^(.+)$","PRE_"."\1"."_SUFF")'
you will havea=PRE_hello_SUFF