- preg_match: documentation ( source)
- array_pop: documentation ( source)
<?php
$originPiwikVisitorId = null;
if (preg_match('/([0-9a-zA-Z]*)\..*/', '3e5035da4a186908.1444637964.6.1445411285.1445411282.', $matches)) {
$originPiwikVisitorId = array_pop($matches);
}
echo $originPiwikVisitorId;