Connecting Tech Pros Worldwide Help | Site Map

extract data from raw text

someusernamehere
Guest
 
Posts: n/a
#1: March 25th, 2008, 06:15 PM
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: March 25th, 2008, 06:35 PM

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: March 25th, 2008, 06:45 PM

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to extract different types of data from a singe file. JoeC answers 7 August 2nd, 2008 10:45 PM
Extracting data from raw HTML deepuceg answers 1 August 21st, 2007 03:16 PM
Legacy data parsing gov answers 9 July 21st, 2005 08:05 AM
Extracting data from SQL Server *.DB file Becoming Digital answers 2 July 19th, 2005 11:35 PM