<?php $string = "001122334 001122334455 0011 0011223344556677"; if (preg_match_all('/\b[a-fA-F0-9]{12}\b/', $string, $matches)) { print_r($matches[0]); } if (preg_match_all('/(?<!\S)[a-fA-F0-9]{12}(?!\S)/', $string, $matches)) { print_r($matches[0]); } if (preg_match_all('/(?<![a-fA-F0-9])[a-fA-F0-9]{12}(?![a-fA-F0-9])/', $string, $matches)) { print_r($matches[0]); }
You have javascript disabled. You will not be able to edit any code.