fork(2) download
  1. <?php
  2. $matches=array();
  3. $regExp="/(,\\S|жы|шы|координально|сдесь|(^|[^а-яА-Я])здел|[^,.]\\sа |[^.,]\\sно[\\.\\,]? )/ui";
  4. $text="Зделай-ка мне раздел";
  5. if (preg_match($regExp, $text, $matches))
  6. {
  7. echo "В тексте ошибка:";
  8. var_dump($matches);
  9.  
  10. }
  11. else
  12. {
  13. echo "Ошибок нет";
  14. }
  15.  
  16. // your code goes here
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
В тексте ошибка:array(3) {
  [0]=>
  string(8) "Здел"
  [1]=>
  string(8) "Здел"
  [2]=>
  string(0) ""
}