--after can now take a regex and optional line count
--after can now take a regex and optional line count

This feature enables you to match from one regex up to another, rather than for a fixed number of lines.  For example,

regrep --after '^$' foo

matches everything from `foo' up to the next blank line, not inclusive.

I implemented the feature using a negative value of $aftershadow because that gave me a flag that would never go false until I wanted it to, all without requiring yet more state.

Some applications will want to include the last line of output in each block; some won't.  I toyed with the idea of adding another switch to include it, but then hit on the idea of the `+1+^$' notation, which is more general (because you can specify any number of lines) and doesn't require an extra switch.

I chose a plus sign because its natural meaning is to add extra lines, and also because a plus sign can't appear at the start of a regex, meaning that the plus sign alone is enough to signify that a line-count is present.

During testing, I found that the double dashes between sections of output worked for --before but not for --after, and so I fixed and simplified that code, too.
markuslaker/regrep