@ 2016-08-09T16:52:15Z <?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"> </p>
<p class="MsoNormal">This shouldn’t get picked up</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Dasdasdasd d asda sd : asd obe: sad neither shood this</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Objective: This is how the object should look, this is a long one</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Agenda:</p>
<p class="MsoListParagraph" style="text-indent:-18.0pt"><span style="">1.<span style="font:7.0pt "Times New Roman"">
</span></span>Make like a tree</p>
<p class="MsoListParagraph" style="text-indent:-18.0pt"><span style="">2.<span style="font:7.0pt "Times New Roman"">
</span></span>And</p>
<p class="MsoListParagraph" style="text-indent:-18.0pt"><span style="">3.<span style="font:7.0pt "Times New Roman"">
</span></span>Get out of here</p>
<p class="MsoNormal"> </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);
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 5.6.0 - 5.6.40 , 7.0.0 - 7.0.33 , 7.1.0 - 7.1.33 , 7.2.0 - 7.2.33 , 7.3.0 - 7.3.33 , 7.4.0 - 7.4.33 , 8.0.0 - 8.0.30 , 8.1.0 - 8.1.28 , 8.2.0 - 8.2.19 , 8.3.0 - 8.3.7 Array
(
[0] => Array
(
[0] => 1.
Make like a tree
[1] => 2.
And
[2] => 3.
Get out of here
)
[1] => Array
(
[0] => 1.
[1] => 2.
[2] => 3.
)
[2] => Array
(
[0] => Make like a tree
[1] => And
[2] => Get out of here
)
)
preferences:dark mode live preview
158.01 ms | 404 KiB | 298 Q