The .
character in a PHP regex accepts all characters except a newline. What can I use to accept ALL characters, including newlines?
For example:
$text = <<<TEXT
foo
bar
TEXT;
preg_match('/.+/', $text, $match);
echo $match[0];
This returns foo
, but I need the full string match to be returned as:
foo
bar