RE: [PHP] explode () question
| From: | Chris W. Parker | Date: | Mon, 10 Nov 2003 17:26:47 +0000 |
| Subject: | RE: [PHP] explode () question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-169059@lists.php.net to get a copy of this message | ||
Malcolm <mailto:malcolm@mbrownell.com>
on Monday, November 10, 2003 9:13 AM said:
> I can't figure out how to do an ereg that will replace just the
> colon in Time nor can I find a way to make explode ignore it. This
> may even be a completely wrong approach, any help would be
> appreciated.
What you'll probably want to do is write a regex that changes the colon
you're trying to separate on into something else.
Go from:
Time: ...
Other Thing: ...
Different: ...
To:
Time% ...
Other Thing% ...
Different% ...
After you've done this you can easily explode() based on the %.
I'm not very good with regex's off the top of my head so I suggest you
get The Regex Coach (easily found via google) and experiment.
Chris.
--
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/