php - Regular Expression for Screen Solution -
i have following string
540x360 [par 1:1 dar 3:2] the result want
540x360 how can , please suggest in future able solve these kind of problem self.
if want use regular expression can use:
$string = "540x360 [par 1:1 dar 3:2]"; $matches = array(); preg_match('/^(\d+x\d+)/i', $string, &$matches); echo $matches[0];
Comments
Post a Comment