0

based on THIS question.

I am parsing a file with bom and get some strange content that I need to remove (see image below)

garbage content

I am trying to remove bom, but apparently this is not bom as solutions with bom removing are not working. Also I tried this:

$str = preg_replace('/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x9F]/u', '', trim($str));
$str = preg_replace('/[\x00-\x1F\x7F\xA0]/u', '', trim($str));

So I need to see what this actually is and remove it. This occurs only with the 1st line of file, all other lines do not contain it. Any ideas how to fix it would be welcome. Thank you.

Jack
  • 857
  • 14
  • 39

1 Answers1

0

You can use this . and get

$str = ".test_id_sbj";

$result= explode('.',$str);

echo $r = $result[1];

proghasan
  • 425
  • 3
  • 20