Using Dotstar · Part 10

Chain

Some jobs take more than one pattern: clean up a log, keep only the lines that matter, then reshape them. The Chain tab runs steps after the pattern, each on the output of the one before, and shows the output at the end.

The Chain tab: log lines replaced by the pattern, then an extract and a replace step that leave the two failed requests.

Steps

1. The first step is the pattern itself: its replacement when Replace is on, otherwise the text as it is. 2. Add a replace step to replace in what came before: the text it doesn’t match is kept. 3. Add an extract step to keep only the matches, each written from a template on a line of its own: $1, $<name>, $& for the whole match.

Each step has its own pattern and flags, in the flavor you’re in, and says how many matches it had. A step can be turned off, to see the chain without it, and moved up or down.

The output

Copy takes the output; Use as text makes it the text, to go on from there with a new pattern. The steps are saved with the session, in projects, the library and shared links.