So, I have this html file that basicaly says:

PHP Code: 
echo '<table>
<tr>
     <td>Welcome to:</td>
     <td><strong>Hell</strong></td>
</tr>
</table>'

(whether this code is or not valid, does not matter.. Is just of the sake of having an example)

Now, I have another php file that (should) gets (through CURL and preg_match) the "<strong>Hell</strong>" part:

Curl Result ends in the var: $Result
Pattern I want to match against the $Result: $pattern = '/ <td>Welcome to\:<\/td>
<td>(.*)<\/td>/m';

Preg Match result var: $pregResult

PHP Code: 
preg_match ($pattern$Result$pregResult
doing a var_dump($pregResult); returns an empty array
PHP Code: 
array(0) { } 
yet, testing my example and reg expr in the site http://www.spaweditor.com/scripts/regex/index.php it returns the expected value (<strong>Hell</strong>)

So, can anyone point me to what is going on wrong because I am out of ideas.

My setup is windows + XAMPP with phpversion 5.3.5.

PC

Here are the actual php files:
-------------- test.php ------------
PHP Code: 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<?php

echo '<table width="50%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>Welcome to:</td>
  </tr>
  <tr>
    <td><strong>Hell</strong></td>
  </tr>
</table>'
;

?>
</body>
</html>
-------------- curl_teste.php ------------
PHP Code: 
<?php
error_reporting
(-1);  

$curlTarget "http://127.0.0.1/multiline/test.php";


$ch curl_init();
curl_setopt($chCURLOPT_URL,$curlTargget);
curl_setopt($chCURLOPT_RETURNTRANSFER,1);

$result curl_exec ($ch);
curl_close($ch);

$patternCoiso '/    <td>Welcome to:<\/td>
    <td>(.*)<\/td>/mi'
;

preg_match($patternCoiso$result$match);


var_dump($match);

?>
PCManiac Reviewed by PCManiac on . A doubt about php's preg_match result. So, I have this html file that basicaly says: echo '<table> <tr> <td>Welcome to:</td> <td><strong>Hell</strong></td> </tr> </table>'; (whether this code is or not valid, does not matter.. Is just of the sake of having an example) Rating: 5