Hi, I need to Remove some lines from a big text file ?

Discussion in 'Programming' started by funkymario, Mar 7, 2010.

  1. #1
    Hello guys, i have this BIG text file (50 000 lines), each line contains a name, example:

    Michael johnson
    derrek pierre
    joséph francois
    sàphire moore
    randy adams

    i need to remove all the lines which contain international charcters like "é" , "à" .. and keep online lines with normal english alphabet, can you please suggest me the simplest way to do this, like a script, or batche file or something ?

    thanks a lot of your help.
     
    funkymario, Mar 7, 2010 IP
  2. funkymario

    funkymario Notable Member

    Messages:
    2,836
    Likes Received:
    369
    Best Answers:
    0
    Trophy Points:
    230
    #2
    hi, well i actually, don't know all the international characters that i had in the file, and it's so BIG 50 000 lines, so i can't do it that way, since i have to discover the special charcters first, anyways, i did it the job with a small php script, thanks.
     
    funkymario, Mar 7, 2010 IP
  3. jcwebhole

    jcwebhole Active Member

    Messages:
    93
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #3
    you can try other text editors...
    we all know how slow notepad is... and is a bit short of functions (hey i do use notepad on a daily basis always have 3-4 notepads open in a normal work day)
    this is fairly easy and fast...

    or of course you can use a php script on it or other scripts (try to get a mass search and replace script handy in this cases)
     
    jcwebhole, Mar 7, 2010 IP
  4. dollarfish

    dollarfish Member

    Messages:
    89
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    26
    #4
    Try notepad++
     
    dollarfish, Mar 8, 2010 IP
  5. NeoCambell

    NeoCambell Peon

    Messages:
    456
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #5
    You need to remove the whole line with international charaters...not just those characters, right?
    UltraEdit macros can do this. If you know VC++ or VB, this can be done quite easily.
     
    NeoCambell, Mar 8, 2010 IP
  6. iterial

    iterial Peon

    Messages:
    52
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    of coz perl will handle that perfectly!
     
    iterial, Mar 11, 2010 IP
  7. iterial

    iterial Peon

    Messages:
    52
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I could offer you the perl code if you need it:)
     
    iterial, Mar 11, 2010 IP