. * * @package LibreNMS * @link http://librenms.org * @copyright 2017 Lorenzo Zafra * @author Lorenzo Zafra */ preg_match('~(?.*)\..*=(?\d*)\.\s+\w+\s+\w+=(?.*)~', $poll_device['sysDescr'], $matches); if ($matches['hardware'] == 'Midspan') { $hardware = 'PoE Midspan'; } if ($matches['serial']) { $serial = $matches['serial']; } if ($matches['version']) { $data = explode(', ', $matches['version']); $version = $data[0]; }