View file forum/preg.php

File size: 6.91Kb
<?
                function replace_rus($str){
                $str = str_replace("а","|",$str);
                $str = str_replace("б","|",$str);
                $str = str_replace("в","|",$str);
                $str = str_replace("г","|",$str);
                $str = str_replace("д","|",$str);
                $str = str_replace("е","|",$str);
                $str = str_replace("ё","|",$str);
                $str = str_replace("ж","|",$str);
                $str = str_replace("з","|",$str);
                $str = str_replace("и","|",$str);
                $str = str_replace("й","|",$str);
                $str = str_replace("к","|",$str);
                $str = str_replace("л","|",$str);
                $str = str_replace("м","|",$str);
                $str = str_replace("н","|",$str);
                $str = str_replace("о","|",$str);
                $str = str_replace("п","|",$str);
                $str = str_replace("р","|",$str);
                $str = str_replace("с","|",$str);
                $str = str_replace("т","|",$str);
                $str = str_replace("у","|",$str);
                $str = str_replace("ф","|",$str);
                $str = str_replace("х","|",$str);
                $str = str_replace("ч","|",$str);
                $str = str_replace("ц","|",$str);
                $str = str_replace("ш","|",$str);
                $str = str_replace("щ","|",$str);
                $str = str_replace("ь","|",$str);
                $str = str_replace("ы","|",$str);
                $str = str_replace("ъ","|",$str);
                $str = str_replace("э","|",$str);
                $str = str_replace("ю","|",$str);
                $str = str_replace("я","|",$str);
                $str = str_replace("А","|",$str);
                $str = str_replace("Б","|",$str);
                $str = str_replace("В","|",$str);
                $str = str_replace("Г","|",$str);
                $str = str_replace("Д","|",$str);
                $str = str_replace("Е","|",$str);
                $str = str_replace("Ё","|",$str);
                $str = str_replace("Ж","|",$str);
                $str = str_replace("З","|",$str);
                $str = str_replace("И","|",$str);
                $str = str_replace("Й","|",$str);
                $str = str_replace("К","|",$str);
                $str = str_replace("Л","|",$str);
                $str = str_replace("М","|",$str);
                $str = str_replace("Н","|",$str);
                $str = str_replace("О","|",$str);
                $str = str_replace("П","|",$str);
                $str = str_replace("Р","|",$str);
                $str = str_replace("С","|",$str);
                $str = str_replace("Т","|",$str);
                $str = str_replace("У","|",$str);
                $str = str_replace("Ф","|",$str);
                $str = str_replace("Х","|",$str);
                $str = str_replace("Ч","|",$str);
                $str = str_replace("Ц","|",$str);
                $str = str_replace("Ш","|",$str);
                $str = str_replace("Щ","|",$str);
                $str = str_replace("Ь","|",$str);
                $str = str_replace("Ы","|",$str);
                $str = str_replace("Ъ","|",$str);
                $str = str_replace("Э","|",$str);
                $str = str_replace("Ю","|",$str);
                $str = str_replace("Я","|",$str);
                return $str;
                }
                function rus_to_k($str){
                $str = str_replace("а","a",$str);
                $str = str_replace("б","b",$str);
                $str = str_replace("в","v",$str);
                $str = str_replace("г","g",$str);
                $str = str_replace("д","d",$str);
                $str = str_replace("е","e",$str);
                $str = str_replace("ё","e",$str);
                $str = str_replace("ж","j",$str);
                $str = str_replace("з","z",$str);
                $str = str_replace("и","i",$str);
                $str = str_replace("й","y",$str);
                $str = str_replace("к","k",$str);
                $str = str_replace("л","l",$str);
                $str = str_replace("м","m",$str);
                $str = str_replace("н","n",$str);
                $str = str_replace("о","o",$str);
                $str = str_replace("п","p",$str);
                $str = str_replace("р","r",$str);
                $str = str_replace("с","s",$str);
                $str = str_replace("т","t",$str);
                $str = str_replace("у","u",$str);
                $str = str_replace("ф","f",$str);
                $str = str_replace("х","h",$str);
                $str = str_replace("ч","c",$str);
                $str = str_replace("ц","q",$str);
                $str = str_replace("ш","w",$str);
                $str = str_replace("щ",">",$str);
                $str = str_replace("ь","<",$str);
                $str = str_replace("ы","x",$str);
                $str = str_replace("ъ",".",$str);
                $str = str_replace("э",":",$str);
                $str = str_replace("ю",";",$str);
                $str = str_replace("я","}",$str);
                $str = str_replace("А","a",$str);
                $str = str_replace("Б","b",$str);
                $str = str_replace("В","v",$str);
                $str = str_replace("Г","g",$str);
                $str = str_replace("Д","d",$str);
                $str = str_replace("Е","e",$str);
                $str = str_replace("Ё","e",$str);
                $str = str_replace("Ж","j",$str);
                $str = str_replace("З","z",$str);
                $str = str_replace("И","i",$str);
                $str = str_replace("Й","y",$str);
                $str = str_replace("К","k",$str);
                $str = str_replace("Л","l",$str);
                $str = str_replace("М","m",$str);
                $str = str_replace("Н","n",$str);
                $str = str_replace("О","o",$str);
                $str = str_replace("П","p",$str);
                $str = str_replace("Р","r",$str);
                $str = str_replace("С","s",$str);
                $str = str_replace("Т","t",$str);
                $str = str_replace("У","u",$str);
                $str = str_replace("Ф","f",$str);
                $str = str_replace("Х","h",$str);
                $str = str_replace("Ч","c",$str);
                $str = str_replace("Ц","q",$str);
                $str = str_replace("Ш","w",$str);
                $str = str_replace("Щ",">",$str);
                $str = str_replace("Ь","<",$str);
                $str = str_replace("Ы","x",$str);
                $str = str_replace("Ъ",".",$str);
                $str = str_replace("Э",":",$str);
                $str = str_replace("Ю",";",$str);
                $str = str_replace("Я","}",$str);
                return $str;
                }
                ?>