I am having a strange problem with preg_match. I am using a regular expression that grabs the title of an article, basically looks for the tag:
preg_match('#(\<title.*?\>)(\n*\r*.+\n*\r*)(\<\/title.*?\>)#', $data, $matches)
When I print out the $matches array I get nothing. But when I try the same thing in a regular expression tester, it works fine. I have even tried putting in a string that would definitely match it in place of the $data variable, without any luck.
What am I doing wrong here?