fork(1) download
  1. <?php
  2. $matches=array();
  3. $text="Вставить теkст";
  4. $reg="/([a-z,A-Z][а-я]+|[а-я]+[a-z]|[а-я]+[a-z][а-я]+)/ui";
  5. $count=preg_match_all($reg, $text, $matches, PREG_SET_ORDER);
  6. for ($i = 0; $i < $count; ++$i) {
  7. echo $matches[$i][0];
  8. echo "\t";
  9. }
  10.  
  11. // your code goes here
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
теk	Вставить [теk]ст