I have some text like so:
1.6 # blah blah blah
# fjsadfklj slkjf yes 3.4
1.8*
1.9 1.10 #blah
#blah
1.11
I want to clean it up by removing all #
characters plus anything following them on the same line. In other words, I desire:
1.6
1.8*
1.9 1.10
1.11
What is the best way to approach this? Via simple methods like partition
, or maybe regexes?