What's the easiest way to grab a 6-character id from a string?
The id will always be after www.twitpic.com/ and will always be 6 characters.
e.g., $string = 'The url is http://www.twitpic.com/f1462i. Enjoy.';
$id = 'f1462i';
Thanks.
preg_match("@twitpic\.com/(\w{6})@", "The url is http://www.twitpic.com/f1462i. Enjoy.", $m);
$id = $m[1];