preg_replace('/^K-Touch[_\-]/u', 'K-Touch ', $s); $s = preg_replace('/^Novo7 ?/iu', 'Novo7 ', $s); $s = preg_replace('/^HW-HUAWEI/u', 'HUAWEI', $s); $s = preg_replace('/^Huawei[ -]/iu', 'Huawei ', $s); $s = preg_replace('/^SAMSUNG SAMSUNG-/iu', '', $s); $s = preg_replace('/^SAMSUNG[ -]/iu', '', $s); $s = preg_replace('/^(Sony ?Ericsson|Sony)/u', '', $s); $s = preg_replace('/^(Lenovo Lenovo|LNV-Lenovo|LENOVO-Lenovo)/u', 'Lenovo', $s); $s = preg_replace('/^Lenovo-/u', 'Lenovo', $s); $s = preg_replace('/^Lenovo/u', 'Lenovo ', $s); $s = preg_replace('/^ZTE-/u', 'ZTE ', $s); $s = preg_replace('/^(LG)[ _\/]/u', '$1-', $s); $s = preg_replace('/^(HTC.+)\s[v|V][0-9.]+$/u', '$1', $s); $s = preg_replace('/^(HTC)[-\/]/u', '$1 ', $s); $s = preg_replace('/^(HTC)([A-Z][0-9][0-9][0-9])/u', '$1 $2', $s); $s = preg_replace('/^(Motorola MOT-|MOT-|Motorola[\s|-])/u', '', $s); $s = preg_replace('/^Moto([^\s])/u', '$1', $s); $s = preg_replace('/^(UTStar-)/u', '', $s); $s = preg_replace('/^VZW:/iu', '', $s); $s = preg_replace('/^(Swisscom|Vodafone)\/1.0\//iu', '', $s); $s = preg_replace('/-?(orange(-ls)?|vodafone|bouygues|parrot|Kust)$/iu', '', $s); $s = preg_replace('/[ -](Mozilla|Opera|Obigo|Java|PPC)$/iu', '', $s); $s = preg_replace('/ ?Build$/iu', '', $s); $s = preg_replace('/ \(compatible$/iu', '', $s); $s = preg_replace('/http:\/\/.+$/iu', '', $s); $s = preg_replace('/^\s+|\s+$/u', '', $s); $s = preg_replace('/\s+/u', ' ', $s); return $s; } }