<?php
$telepulesek = file("telepulesek.txt");
foreach ($telepulesek as $telepules) {
$telepules = str_replace("\n","",$telepules);
$hossz = strlen($telepules);
$cs = substr_count($telepules, "cs") + substr_count($telepules, "Cs");
$dz = substr_count($telepules, "dz") + substr_count($telepules, "Dz");
$dzs = substr_count($telepules, "dzs") + substr_count($telepules, "Dzs");
$gy = substr_count($telepules, "gy") + substr_count($telepules, "Gy");
$ly = substr_count($telepules, "ly") + substr_count($telepules, "Ly");
$ny = substr_count($telepules, "ny") + substr_count($telepules, "Ny");
$sz = substr_count($telepules, "sz") + substr_count($telepules, "Sz");
$ty = substr_count($telepules, "ty") + substr_count($telepules, "Ty");
$zs = substr_count($telepules, "zs") + substr_count($telepules, "Zs");
if ($dzs>0) {
$dz = $dz - $dzs;
$zs = $zs - $dzs;
}
$hossz = $hossz - $cs - $dz - $dzs - $gy - $ly - $ny - $sz - $ty - $zs;
if (($hossz == 13) || ($hossz == 14))
echo $telepules."\n";
}
?>