On Tue, 02 Dec 2003 13:14:20 +0000, you wrote: >Is there an easy, non expensive way to do the perl-equivalent of: >$date=20031202; >($year, $month, $day) = ($date =~ /(\d{4})(\d{2})(\d{2})/; > >I looked through the preg_* functions online, but couldn't see anything >to help me. Am I stuck with substr() :P ?
list() springs to mind list ($a, $b, $c) = preg_split (/* mumble mumble */); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php