$re = '~^
(?P<datetime>\d{2}/\d{2}/\d{4}[^-]+)\s+-\s+
(?P<name>[^:]+):\s+
(?P<message>[\s\S]+?)
(?=^\d{2}|\Z)~mx';
$str = '15/11/2017, 10:59 p.m. - βͺSome random nameβ¬: Thats sounds like crow who don\'t know marathiπ€£
15/11/2017, 11:00 p.m. - Pratik: ππ
15/11/2017, 11:00 p.m. - Dhiraj Kadam: Msging language bruhπππ
15/11/2017, 11:00 p.m. - Rushiraj Msc: ππππ
15/11/2017, 11:00 p.m. - Shreyas : π©π©π©
15/11/2017, 11:01 p.m. - Abhisek Joshi: ππ
15/11/2017, 11:01 p.m. - βͺSome Name: Age piche ke students 2 ... 2 subject padho and copy.. nahi ata to thoko bhindhass
15/11/2017, 11:01 p.m. - Shreyas : ππΌππΌππΌππΌπ―
15/11/2017, 11:02 p.m. - βͺSome name: Respect the term autonomous
15/11/2017, 11:02 p.m. - βͺSome Name : Gharguti ...π
14/11/2017, 9:54 a.m. - Abhisek Josh: πππ
14/11/2017, 10:37 a.m. - βͺSOme Name: Do you still remember those awkward days in schools during Exams ?
When a bright student tells the invigilator that question 4 has a problem, but you have already answered it...π³π
When a fellow student asks for a graph paper, but you are finished and did not see anywhere where it was required...π§ ππ
When the invigilator says jump question 6 we will rectify it later, but it was the question you enjoyed most when answering...π π±π²
When you see people busy using rulers and you are wondering what is going on...π£π«π«
When you hear your friends arguing after the exam whether the answer to question 5 was 35.5% or 36.5% and your answer was 1800 π©π
The cream. When the other students asked for 4-5 additional answer sheets and You had two pages empty in the main answer sheetπ¨π°π±
See where you have reached in life inspite of those moments...things are not permanent...enjoy life! ππ
Only for those who enjoyed their school lifeπππ
Top 10 Dialogue of teacher
π If you are not interested then you may leave the class.
π This class is worse than a fish market.
π Are you here to waste your parents money?
π Tell me when you all have finished talking.
π Why are u laughing? Come here n tell us we\'ll also laugh.
π Do you think teachers are fools to teach you?
π Don\'t try to act oversmart with me.
π Why do u come to school when you don\'t want to study.
π The previous batch was 100 times better than yours.
π If you want to talk then u may get out from the class.
And the best one
π You yes you... I am talking to you only, don\'t look back.. ππ
.
.
.
I\'m sure that the last line made all of you remember and smile .
14/11/2017, 10:42 a.m. - βͺNameβ¬: πππ
14/11/2017, 11:15 a.m. - Sanesh Sagvekar: Whos in clg now
14/11/2017, 11:15 a.m. - Sanesh Sagvekar: πππππΌππΌππΌ';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php