need an easy Regular Expression

From: Date: Wed, 12 Jul 2000 18:18:41 +0000
Subject: need an easy Regular Expression
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-6208@lists.php.net to get a copy of this message
Hi, I have schedule data like this: 11:30am discuss cornflower blue 1:30pm lunch 5:00pm adjourn I would like a regex that will put this in table format - a single row with clock time in one data cell and the event in the other data cell like: <tr><td>1:30pm</td><td>lunch</td></tr> Can anyone help me? So far I have: eregi_replace("([0-9]{1,2}:[0-9]{2}[[:space:]]?[ap][.]?m[\.]?)([.]*)", "<tr><td>\\1</td><td>\\2</td></tr>", $schedule); But that gives me: <tr><td>1:30pm</td><td></td></tr>lunch Help? A

« previous php.general (#6208) next »