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

Popular posts from this blog

delphi - TJvHidDeviceController "DevicePath" always showing "\" -

web applications - Making Python scripts work on MAMP -

cocoa - Converting NSString to keyCode+modifiers for AXUIElementPostKeyboardEvent -