On 7/15/21 1:48 PM, Arnold Robbins wrote:
The regexp used there, ".^", to my mind should be treated as invalid.
No, that regular expression is valid because "." matches newline in POSIX EREs. So the "." matches a newline, and the following "^" matches the start of the next line.