fork(1) download
  1. <?php
  2.  
  3. $html = <<< LOB
  4. this is example of string , test . R.K
  5. this is second example of string , test2 . R.K2
  6. LOB;
  7.  
  8. preg_match_all('/^.*?,(.*?)\.(.*?)$/im', $html, $matches, PREG_PATTERN_ORDER);
  9. for ($i = 0; $i < count($matches[0]); $i++) {
  10. echo $matches[1][$i] . " " . $matches[2][$i];
  11. }
  12.  
Success #stdin #stdout 0.01s 24144KB
stdin
Standard input is empty
stdout
 test   R.K test2   R.K2