This question already has answers here: How do I match any character across multiple lines in a regular expression?