PHP preg_match (.*) not matching past line breaks [duplicate]
Solution 1:
Use the s
modifier.
preg_match('/Para(.*)three/s', $row['file'], $m);
Pattern Modifiers
Solution 2:
Add the multi-line modifier.
Eg:
preg_match('/Para(.*)three/m', $row['file'], $m)
Solution 3:
Try setting the regex to dot-all (PCRE_DOTALL), so it includes line breaks (the extra 's' parameter at the end):
preg_match('/Para(.*)three/s', $row['file'], $m);