Check: '.htmlentities($file).'
'; $cont = file_get_contents($file); $cont = utf8_decode($cont); if (strpos($cont, '["Allianz"]') !== FALSE) { print 'Contains german "Allianz" as Section!
'; } preg_match_all("/[^-!'\d\s0-9a-zA-Zäöüß_={}\[\],\".?()\/:ÜÖÄ]+/", $cont, $matches); if (count($matches) != 1) { die('o_O?'); } else $matches = $matches[0]; $result = array_unique(array_values(array_filter($matches, 'myFilter'))); echo ''; var_dump($result); echo ''; } function myFilter($var) { if ($var == "\\" || $var == '&' || $var == '´' || $var == '+') { // couldn't/shouldn't? be filtered above return false; } return true; } function myFunc($var) { } ?>