note 22958 added to function.sscanf

From: Date: Fri, 05 Jul 2002 07:46:17 +0000
Subject: note 22958 added to function.sscanf
Groups: php.notes 
Request: Send a blank email to php-notes+get-32627@lists.php.net to get a copy of this message
i am trying to parse a literature-file with articles, books, conference-proceedings in different formats. x(Agha, M., Branker, D. S.) (1997), Maximum Likelihood Estimation and Goodness-of-fit Tests for Mixtures of Distributions, Applied Statistics, Vol. 46, S. 399-407. x(Aitkin, M., Anderson, D., Hinde, J.) (1981), Statistical Modelling of Data on Teaching Styles, Journal of the Royal Statistical Society, Series A, Vol. 144, Part 4, S. 419-561. i have tried to solve this with the sscanf-function: sscanf($lit[$x],"Vol. %d", &$vol[$x]); sscanf($lit[$x],"No. %d", &$no[$x]); sscanf($lit[$x],"Series %s", &$ser); sscanf($lit[$x],"S. %d-%d.", &$pagef[$x], &$paget[$x]); list($author[$x], $year[$x], $title[$x], $journal[$x])=sscanf($lit[$x],"x(%[a-zA-Z., ”\{}]) (%d), %[^,], %[^,]"); unfortunately the variables vol, no, series, pagef and paget do not work. can anyone help, as i do not understand what may be wrong? -- http://www.php.net/manual/en/function.sscanf.php http://master.php.net/manage/user-notes.php?action=edit+22958 http://master.php.net/manage/user-notes.php?action=delete+22958 http://master.php.net/manage/user-notes.php?action=reject+22958

« previous php.notes (#32627) next »