Just to give you an alternative. You can also use the column editing mode.
Press Alt and Left click your mouse and move the mouse vertically along all the lines you want to edit. Then you can simply delete everything starting from this column.
EDIT. In the second glance, I see that you mentioned that the lines have different lengths. So this may not work in your case. In any case, I will leave it as it is. Who knows that this may come in handy later, or maybe for someone else.
user995502
source share