2 ms·
That's great, and quite concise. I didn't get further than a sed query to filter the correct paragraphs, and then replace .* with a group filter (WR|DV|P8) to n
by tremon 11y ago
That's great, and quite concise. I didn't get further than a sed query to filter the correct paragraphs, and then replace .* with a group filter (WR|DV|P8) to narrow the search:
$ sed -rne '/L337.*9$/,/^$/p' vehicles
- Gorgor 11y agoI don’t understand what you gain in replacing .* with (WR|DV|P8) in a second query. Could you elaborate on that?
- tremon 11y agoWell, listing all the number plates that match /L337.*9/ will also return a number of other models and colours than the one we're looking for. So you could make the list smaller by only filtering on the license plates of correct models. But you're right that there's very little gained. The effort of reducing a list of 9 to a list of 4 is better spent on advancing the puzzle :)