- Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
- array ( 0 => 'iPhone 7 plus', 1 => 'iPhone6 plus', 2 => 'iPhone 5', )
<?php
$strings = [
'iPhone 7 plus - space grey (New)',
'iPhone6 plus, brand new, (Used)',
'iPhone 5 ( black)',
];
var_export(preg_replace('~ ?[^ [:alnum:]].*~', '', $strings));