3v4l.org

run code in 300+ PHP versions simultaneously
<?php $calendar_code = ' <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta content="text/html; charset=us-ascii"> <meta name="Generator" content="Microsoft Word 15 (filtered medium)"> <style> <!-- @font-face {font-family:"Cambria Math"} @font-face font-family:"Calibri",sans-serif} p.msonormal0, li.msonormal0, div.msonormal0 .MsoChpDefault {font-size:10.0pt; font-family:"Calibri",sans-serif} @page WordSection1 {margin:72.0pt 72.0pt 72.0pt 72.0pt} div.WordSection1 {} ol {margin-bottom:0cm} ul {margin-bottom:0cm} --> </style> </head> <body lang="EN-GB" link="#0563C1" vlink="#954F72"> <div class="WordSection1"> <p class="MsoNormal">This is a test of the agenda and objectives format</p> <p class="MsoNormal">&nbsp;</p> <p class="MsoNormal">This shouldn’t get picked up</p> <p class="MsoNormal">&nbsp;</p> <p class="MsoNormal">Dasdasdasd d asda sd&nbsp; : asd obe: sad neither shood this</p> <p class="MsoNormal">&nbsp;</p> <p class="MsoNormal">Objective: This is how the object should look, this is a long one</p> <p class="MsoNormal">&nbsp;</p> <p class="MsoNormal">Agenda:</p> <p class="MsoListParagraph" style="text-indent:-18.0pt"><span style="">1.<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span>Make like a tree</p> <p class="MsoListParagraph" style="text-indent:-18.0pt"><span style="">2.<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span>And</p> <p class="MsoListParagraph" style="text-indent:-18.0pt"><span style="">3.<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span>Get out of here</p> <p class="MsoNormal">&nbsp;</p> <p class="MsoNormal">Some more stuff here, and here and ::: ;s</p> <p class="MsoNormal">Sadfdsf sdfdfeswrfew </p> </div> </body> </html> '; function uniord($s) { return unpack('V', iconv('UTF-8', 'UCS-4LE', $s))[1]; } $strip = html_entity_decode(strip_tags($calendar_code)); preg_match_all("/^(\d+\.)[\s\x{00a0}]+([^\r\n]+)(?:[\r\n]*)/mu", $strip, $matches); print_r($matches);

preferences:
24.71 ms | 408 KiB | 5 Q