Search code examples
regexgreptextwrangler

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.


Solution

  • 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.