SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2008
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question ASCII text file parser

    greetings,

    im looking for a ASCII text file parser that does the following: the program or script reads in any text file, searches for a specific user-inputed parameter then outputs the line without the parameter. if the line does not contain the parameter then the line is outputed as is.

    input-file: genfile.ged

    user-inputed parameter: ttp://trees.ancestry.com/rd?f=sse&db=txbirthindex&h=6387624&ti=0&indiv=try&gss=pt

    0 HEAD
    1 CHAR ANSI
    1 SOUR Ancestry.com Family Trees
    2 VERS (2010.3)
    2 NAME Ancestry.com Family Trees
    2 CORP Ancestry.com
    1 GEDC
    2 VERS 5.5
    2 FORM LINEAGE-LINKED
    0 @P1@ INDI
    1 BIRT
    2 DATE 20 March 1967
    2 PLAC Dallas, Dallas County, Texas, USA
    2 SOUR @S-2097456309@
    3 NOTE ttp://trees.ancestry.com/rd?f=sse&db=txbirthindex&h=6387624&ti=0&indiv=try&gss=pt
    3 NOTE
    3 DATA

    output-file: genfile.ge1

    0 HEAD
    1 CHAR ANSI
    1 SOUR Ancestry.com Family Trees
    2 VERS (2010.3)
    2 NAME Ancestry.com Family Trees
    2 CORP Ancestry.com
    1 GEDC
    2 VERS 5.5
    2 FORM LINEAGE-LINKED
    0 @P1@ INDI
    1 BIRT
    2 DATE 20 March 1967
    2 PLAC Dallas, Dallas County, Texas, USA
    2 SOUR @S-2097456309@
    3 NOTE
    3 NOTE
    3 DATA

    notice that the only change is that the http parameter has been removed, but the 3 NOTE remains.

    the file size can be any size from small to large. this is stand-alone (user computer), placed on website not required.

    thanks,
    John....

  2. #2
    SitePoint Member
    Join Date
    Aug 2012
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Use IntelliGet

    I think IntelliGet is what you can use to this kind of a thing. My job requires doing a lot of select, filter, replace text from multiple files which I have completely automated using this tool. I was earlier using perl, then Monarch but finally settled on this one as it was very easy and flexible. Its available on Mountone technologies website


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •