Using Dotstar · Part 3

Matches and groups

The text shows where the pattern matches; the Matches tab says what each match is. Its count is on the tab itself, so you see it from any other tab.

The Matches tab as a table: one row a log line, one column a named group.

Four views

  • Details: each match with where it is and every group it captured, by number and name.
  • Lines: the whole lines with a match in them, as grep shows them.
  • Only matches: just the matched text, one a line.
  • Groups: a table, a row a match and a column a group, named groups by their names. The quickest way to see that each group takes what you meant, all the way down.

Each view can be copied as it is, the table as tab-separated text that pastes into a spreadsheet.

Collect

Collect… writes the matches out as a list of their own, one a line, from a template: $1 or $<name> for a group, $& for the whole match, \t for a tab. Say a log has failed downloads with an ID each: the pattern download (\d+) failed and the template $1 give every failed ID.

  • Duplicates: keep all, remove duplicate lines, or one per a group (the first match for each ID), so an ID retried ten times is there once.
  • Sorted puts the lines in order, numbers as numbers.
  • Copy takes the list; Save as… makes a file of it.

In Files, Collect gathers from every file searched, with the file name and line number in front if you like, as grep writes them.

Stepping through

Above the text, the arrows step from match to match (Enter and ⇧Enter in the pattern field, ⌘G and ⇧⌘G anywhere), scrolling each into view and outlining it. The counter says which one you’re on.