Small regex help?

From: Date: Thu, 13 Oct 2005 02:18:00 +0000
Subject: Small regex help?
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-21420@lists.php.net to get a copy of this message
Can anyone suggest the correct regex to replace col1,col2... with count(*) and strip out everything just before ORDER BY? so for this: SELECT col1,col2... FROM tbl WHERE filter1 filter2 ORDER BY order1,order2 I would get this: SELECT count(*) FROM tbl WHERE filter1 filter2 Thanks!

« previous php.pear.general (#21420) next »