fork(1) download
  1. <?php
  2.  
  3. $regExp="/(,.[^ ])/ui";
  4. $text = "Привет,привет. Здравствуй, здравствуй,здравствуй .";
  5. $error = array();
  6. preg_match_all($regExp, $text, $error);
  7. var_dump($error);
Success #stdin #stdout 0.02s 24192KB
stdin
Standard input is empty
stdout
array(2) {
  [0]=>
  array(3) {
    [0]=>
    string(5) ",пр"
    [1]=>
    string(4) ", з"
    [2]=>
    string(5) ",зд"
  }
  [1]=>
  array(3) {
    [0]=>
    string(5) ",пр"
    [1]=>
    string(4) ", з"
    [2]=>
    string(5) ",зд"
  }
}