replace dotall with multiline to simplify regex