in reply to multiline regex
The former makes the ^ and $ anchors match any new line in your string, and the latter makes . match newlines. Subtly different, but very useful.