What I want
I am trying to transform this:
foo awehorihawolvbahvierwba3485y089726y216
bar :aw]\e[;r\a32[5a94t8g-09po
into this:
foo,
bar
The problem
My current solution is to remove the "junk" and replace it with a comma:
$1
${1/(\\w+).*/$1,/gm}
This however leaves a trailing comma and I find it annoying to remove the trailing comma every time.
foo,
bar,
What I've tried
Take the original idea and nest it into this transform
${<insert transform here>/,$//}
... like this ...
${${1/(\\w+).*/$1,/gm}/,$//}
