RE: [PHP] regex pattern match and extract

2001-05-10 Thread ..s.c.o.t.t.. [gts]
--- > From: Michael Roark [mailto:[EMAIL PROTECTED]] > Subject: [PHP] regex pattern match and extract > > $sql="select nfo_gname from galaxy_nfo limit 1"; > $result=db_query($sql); > if ($result) { > > while (list($nfo_gname)=mysql_fetch_row($result)) { >

[PHP] regex pattern match and extract

2001-05-10 Thread Michael Roark
$sql="select nfo_gname from galaxy_nfo limit 1"; $result=db_query($sql); if ($result) { while (list($nfo_gname)=mysql_fetch_row($result)) { echo ("$nfo_gname"); ereg ("\[[a-zA-Z0-9]\]", $nfo_gname, $regs); echo $regs[1]; I'm trying to match any thing between [] and pull it from the string and