<?php
$html = <<< LOB
this is example of string , test . R.K
this is second example of string , test2 . R.K2
LOB;
preg_match_all('/^.*?,(.*?)\.(.*?)$/im', $html, $matches, PREG_PATTERN_ORDER
); for ($i = 0; $i < count($matches[0]); $i++) { echo $matches[1][$i] . " " . $matches[2][$i];
}
PD9waHAKCiRodG1sID0gPDw8IExPQgp0aGlzIGlzIGV4YW1wbGUgb2Ygc3RyaW5nICwgdGVzdCAuIFIuSwp0aGlzIGlzIHNlY29uZCBleGFtcGxlIG9mIHN0cmluZyAsIHRlc3QyIC4gUi5LMgpMT0I7CgpwcmVnX21hdGNoX2FsbCgnL14uKj8sKC4qPylcLiguKj8pJC9pbScsICRodG1sLCAkbWF0Y2hlcywgUFJFR19QQVRURVJOX09SREVSKTsKZm9yICgkaSA9IDA7ICRpIDwgY291bnQoJG1hdGNoZXNbMF0pOyAkaSsrKSB7CgllY2hvICRtYXRjaGVzWzFdWyRpXSAuICIgIiAuICRtYXRjaGVzWzJdWyRpXTsKfQo=