In previous version (ST3) of Sublime Text, there was invert selection in Selection menu. With which you could simple select the text you desired to keep, invert the selection and delete.
Seems it's removed in current version. How to perform same action?