1/28 Quick regex Q: Say I have a line of data, and inside that line I
have some parts between two symbols:
This is a line ~of data~ where ~the tildes are my symbols~
How do I sed this line to get rid of the tildes and anything
between each pair of tildes? The end result should be:
This is a line where
\_ 's/~[^~]*~//g'
To handle the whitespace the way you request would be trickier
and would require more knowledge of just how you're using these
tags.
\_ Thank you. I'll work with this for now.
\_ I'm not sure I understand how your regex works. Wouldn't
's/~.*?~//g' do the job handling whitespaces as well? - ! op/pp
\_ nvm. Just understood what you meant about whitespaces. -pp |