Non-Greedy Grep

I have text file that contains the same information in each line. I want to remove all of the text between San and Director. Without the ?, grep is greedy and takes everything from San to the end of the line. Adding the question mark stops it before Director.


San.*?Director

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.