Kashif
Kashif

Reputation: 4632

How to select to the end of line

I am trying to clean up a text file. Every line has a tab in the middle somewhere. I want to delete everything including that tab to the end of that each line. This will give me just the text before the tab in each line.

I am struggling with grep syntax in TextWrangler search to achieve this.

Upvotes: 0

Views: 400

Answers (1)

Brendan Ritchie
Brendan Ritchie

Reputation: 2345

You can use \t.*$ to select everything from a tab (inclusive) to the end of a line. \t represents a tab and $ represents end of line.

Upvotes: 2

Related Questions