Treat a newline in string as dividing string into multiple
lines, so that $ can match before the newline and ^ can match after.
Also, don't permit . to match a newline, and don't permit [^...] to
match a newline.
By default a newline acts like any other ordinary character.