extract data from raw text

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • someusernamehere

    #1

    extract data from raw text

    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

    #2
    Re: extract data from raw text

    On Mar 25, 1:14 pm, someusernameher e <someusernameh. ..@gmail.com>
    wrote:
    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.

    Comment

    • Jerry Stuckle

      #3
      Re: extract data from raw text

      someusernameher e wrote:
      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@attgl obal.net
      =============== ===

      Comment

      Working...