How to do a non-greedy match in grep?

I want to grep the shortest match and the pattern should be something like:

<car ... model=BMW ...>
...
...
...
</car>

… means any character and the input is multiple lines.

7 Answers
7

Leave a Comment