I am triyng to replace 2 or more newlines with just 1 using PHP's preg_replace()
function
$entry = preg_replace('/\n{2,}/', '\n', $entry);
However it replaces it with a "\n" instead of a newline. I mean, it sees \n as a normal string with two letters. What should i do?