Regular expressions CANNOT match “newline” sequences at the end of a line. Therefore, the expression [^a] matches any character, except for “a” and a “newline” (single Line-Feed or Carriage-Return and Line-Feed). Similarly, the *, + and ? operators stop matching when they reach the “newline” characters.
The only exception to this is “\N” which explicitly matches the “newline” character(s).