preg_replace() not working on node title in hook_preprocess_page() Here's code from my module:

function mymodule_preprocess_page(&amp;$variables) {
  // load the node object
  $node = node_load(arg(1));
  $fied = $node-&gt;field_building_sell['und'][0]['value'];

  // regexp
  $pattern = '/(\w+\s\w+,\s\w+\s.{3}\s\/\/\s\w+)(.*)/i';
  $replacement = '$1';
  $subject = $node-&gt;title;
  $replaced = preg_replace($pattern, $replacement, $subject);

  $variables['title'] = $replaced; 

  dpm($replaced);
}


My node title looks like this: 

building Sell, Alatau r-n // City - mon, 03/03/2014 - 22:29

But i still get the full node title unchanged. Is preg_replace() not working in preprocess_page hook?

UPDATE

I have noticed, if i replace:

$subject = $node-&gt;title;


to

$subject = 'building Sell, Alatau r-n // City - mon, 03/03/2014 - 22:29';


It works! But it's not working with $node-&gt;title, though, node title output is exactly the same as the string i posted above.
Just did dpm($node->title) and noticed extra white-space here:

building  Sell, Alatau r-n // City - mon, 03/03/2014 - 22:29


Though, when i was just printing it $node-&gt;title it didn't showed any extra white-spaces.