I'm missing something with this regular expression find/replace attempt. I have the following format:
word | word | word
I would like to first replace every word
with "word"
to produce
"word" | "word" | "word"
and then subsequently every [space]|
with ,
, finally producing
"word", "word", "word"
Obviously I could just do this with two simple find(f)/replace(r) commands ( f:([a-z]*\>)
r:"$1"
; f:[space]|
r:,
), but is there a way to do all of this at once?
I've tried lots of different ideas, but they all failed. The most successful was finding ([a-z]*\>)(( \|)|\R)
and replacing with "$1",
, which only ever got me a "word", "word", word
format. The solution is probably either much more complicated or much simpler than I'm trying, but I'm stumped. Thanks!