I am reading in a comments file from a Perl program I have been using, and I
will be converting the comments' text files into a MySQL database...but that
is unimportant. In the files, I have something (after i strip_tags()) like
this:
##################
$file = "
# 4
Name:
Vigilante
E-mail:
[EMAIL PROTECTED]
Date:
Monday, July 24, 2000, 5:28 PM
ip:
Hidden
Comment
Hmm. Even that link doesn't work anymore. Looks like they took that
comic down (booo). Anyone save it?
# 3
Name:
Anonymous Unregistered
E-mail:
[EMAIL PROTECTED]
Date:
Monday, July 24, 2000, 8:57 AM
ip:
209.181.217.205
Comment
http://www.pvponline.com/archive.php3?archive=20000723
The URL changed because it was yesterday's comic :)
";
###################
What I want to do is break it down so it looks like this (NOTE: "``````x"
would be the break between comments)
################
$file = "
# 4
Name: Vigilante
E-mail:[EMAIL PROTECTED]
Date:Monday, July 24, 2000, 5:28 PM
ip:Hidden
Comment:Hmm. Even that link doesn't work anymore. Looks like they took that
comic down (booo). Anyone save it?
``````x
# 3
Name:Anonymous Unregistered
E-mail:[EMAIL PROTECTED]
Date:Monday, July 24, 2000, 8:57 AM
ip:209.181.217.205
Comment:http://www.pvponline.com/archive.php3?archive=20000723<br>The URL
changed because it was yesterday's comic :)
";
#################
Then I could parse it easier. So, I guess i need a regexp to remove all the
\n and :space: chars.
Thanks,
David Balatero
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]