Connecting Tech Pros Worldwide Help | Site Map

extract data from raw text

someusernamehere
Guest
 
Posts: n/a
#1: Mar 25 '08
Hey, I need to create an application wich extract data from a .csv
text (delimited by commas), the problem is that I only need some
relevant data, its posssible extract what I want (may be with regular
expressions, by matching some words, thought) with PHP?, can anyone
give me an example/approach?

many thanks.
ZeldorBlat
Guest
 
Posts: n/a
#2: Mar 25 '08

re: extract data from raw text


On Mar 25, 1:14 pm, someusernamehere <someusernameh...@gmail.com>
wrote:
Quote:
Hey, I need to create an application wich extract data from a .csv
text (delimited by commas), the problem is that I only need some
relevant data, its posssible extract what I want (may be with regular
expressions, by matching some words, thought) with PHP?, can anyone
give me an example/approach?
>
many thanks.
<http://www.php.net/fgetcsv>
<http://www.php.net/str_getcsv>

Those will turn a line from a csv file into an array. From there you
can just use the values you need.
Jerry Stuckle
Guest
 
Posts: n/a
#3: Mar 25 '08

re: extract data from raw text


someusernamehere wrote:
Quote:
Hey, I need to create an application wich extract data from a .csv
text (delimited by commas), the problem is that I only need some
relevant data, its posssible extract what I want (may be with regular
expressions, by matching some words, thought) with PHP?, can anyone
give me an example/approach?
>
many thanks.
>
Maybe the easiest would be to just use fgetcsv() and throw away what you
don't want.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Closed Thread