flyhoney Posted November 14, 2008 Share Posted November 14, 2008 No.....! mine is simplest, he can edit it easily and doesn't need to know regex Everyone needs to learn regex. http://xkcd.com/208/ Quote Link to comment Share on other sites More sharing options...
Barand Posted November 14, 2008 Share Posted November 14, 2008 It's on my list of "things to do before I die" Quote Link to comment Share on other sites More sharing options...
DeanWhitehouse Posted November 14, 2008 Share Posted November 14, 2008 Lol, same, so count me out i have no more ideas :'( Quote Link to comment Share on other sites More sharing options...
edwardtilbury Posted November 14, 2008 Author Share Posted November 14, 2008 Like this: <?php $numbers = array(); $subject = 'This 19th century easter egg basket includes the following parts: A giant robot from the year 2008 (12345), Left window trim for a 1993-2001 Lexus SC400 (12346), and a 1/6th scale papier-mache head of Ron Paul made from native indians in Luxembourg'; $pattern = '/\(([\d]+)\)/'; preg_match_all($pattern, $subject, $numbers); $numbers = array_pop($numbers); print_r($numbers); ?> I was being facetious . Either way, it is a creative solution. WORKS!! I'm sure the other ones work as well, IMHO you are all winner, but I if I have to choose, I would say FLYHONEY. I need to read my PHP book again! THANKS TO EVERYONE FOR THE HELP! ;D ;D ;D ;D Quote Link to comment Share on other sites More sharing options...
flyhoney Posted November 14, 2008 Share Posted November 14, 2008 Quote Link to comment Share on other sites More sharing options...
Barand Posted November 14, 2008 Share Posted November 14, 2008 I concur. Results and times Barand Array ( [0] => 12345 [1] => 12346 ) FlyHoney Array ( [0] => 12345 [1] => 12346 ) Blade Array ( [0] => This 19th century easter egg basket includes the following parts: A giant robot from the year 2008 [1] => 12345 Left window trim for a 1993-2001 Lexus SC400 [2] => 12346 and a 1/6th scale papier-mache head of Ron Paul made from native indians in Luxembourg ) CV Array ( [0] => 19 [1] => 2008 [2] => 12345 [3] => 1993 [4] => 2001 [5] => 400 [6] => 12346 [7] => 1 [8] => 6 ) Barand : 0.000859 FlyHoney : 0.000307 Blade : 0.000095 CV : 0.001316 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.