Re: PHP, Excel, .CSV's, and Regular Expressions Help Needed!

From: Date: Mon, 23 Jul 2001 19:45:59 +0000
Subject: Re: PHP, Excel, .CSV's, and Regular Expressions Help Needed!
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-59261@lists.php.net to get a copy of this message
Hi Jeff, I didn't get your question. Can you elobrate little bit more, if possible? What is the input and what is output you are expecting and what do you want to do in the process? Thanks. Jeff Lacy wrote:
Hello Everyone, A client of mine is working with excel, and I need to move the data from excel to something php can deal with a little better. Naturally, I figured
using .csv would be easiest, but I am running into several problems.    I
can get around them, but I need a regular expression (and I am NOT good at writing those). I'm not quite sure how I should explain what the regular expression ought to do, so I am giving an example of the data ought to look like in php (after the regular expressions), and how it looks in the .csv. NOTE: I am exploding the data, so all ,'s must be changed into COMMA's. +---------------------------------------+----------------------------+
| php                                                      | .cvs
| +---------------------------------------+----------------------------+
piCOMMA 3.14,hey is for horses            "pi, 3.14",hey is for horses
"byeCOMMA bye",ciaoCOMMA ciao    """bye, bye""", "ciao, ciao"
"good morning,I'm Bob                             """good morning", I'm Bob
sleep is good,IceCOMMACOMMA        sleep is good,"Ice,,"
If those four examples aren't enough, please let me know. I am NOT on the php mailing list, so PLEASE send messages to me (jeffdl@mn.mediaone.net AND to php-general@lists.php.net). Thank you very much (in advance), Jeff


« previous php.general (#59261) next »