<?php $string = '/server localhost:3306 root:some pass with spaces & a : colon'; preg_match('~/server ([^:]+):(\d+) (.+)~', $string, $m); array_shift($m); // remove the fullstring match var_export($m);
You have javascript disabled. You will not be able to edit any code.