fork download
  1. <?php
  2.  
  3. $text = "roses are red,and violets are blue.whatever you do i'll keep it for you.";
  4. $dividedLine = preg_split("/(?<=[.])/",$text,0,PREG_SPLIT_NO_EMPTY);
  5. print_r($dividedLine);
  6.  
Success #stdin #stdout 0s 82624KB
stdin
Standard input is empty
stdout
Array
(
    [0] => roses are red,and violets are blue.
    [1] => whatever you do i'll keep it for you.
)