1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How can I remove spaces from line breaks?

Discussion in 'Black Hat SEO Tools' started by Ztak07, Feb 23, 2013.

  1. Ztak07

    Ztak07 Regular Member

    Joined:
    Jun 23, 2012
    Messages:
    389
    Likes Received:
    116
    I have a very big document but I have only one problem

    The documents has over 1 million lines but a lot of them are empty.

    They look like :

    xxxxxxxx

    xxxxxxx




    xxxxxxxx
    xxxxxxx

    xxxxxxxx

    I want them to look like :
    xxxxxxx
    xxxxxxx
    xxxxxxxx
    xxxxxxxx
    xxxxxxxxx
    xxxxxxxx

    with no extra whitespace. Anyone know how to do this? Tried in excel but the file way to big
     
  2. Blakester

    Blakester Power Member

    Joined:
    Mar 17, 2012
    Messages:
    720
    Likes Received:
    840
    Location:
    In front of my pc
    • Thanks Thanks x 2
  3. jascoken

    jascoken Senior Member

    Joined:
    Nov 1, 2010
    Messages:
    1,135
    Likes Received:
    751
    Gender:
    Male
    Occupation:
    IT/Web Systems & Development...
    Location:
    Sussex:UK
    ... Or use any good text editor and search and replace any double line-breaks with a single line-break. As it is recurring, it will remove all blank lines. NotePad2 allows you to search and replace on codes like /n/n and replace with /n. This won't work with lines with spaces on them though.
     
  4. SeoTube

    SeoTube BANNED BANNED

    Joined:
    Jun 8, 2012
    Messages:
    309
    Likes Received:
    302
    serch on Google "Remove Empty Lines".. Google show you good result :)
     
  5. AnnaCh

    AnnaCh Newbie

    Joined:
    Feb 9, 2013
    Messages:
    43
    Likes Received:
    14
    I'm not sure that will it be work with large file or not,

    Using : Notepad
    - copy all your text and paste to notepad
    - at notepad, just press Ctrl+A to select all, then Alt+R to remove blank lines // this step may take a few minutes or longer for large file
    - Finally, copy your text from notepad and paste back to your excel
     
  6. bitencrypt

    bitencrypt BANNED BANNED

    Joined:
    Feb 1, 2012
    Messages:
    118
    Likes Received:
    13
    non breaking space tag "google it"
     
  7. Gogol

    Gogol Elite Member

    Joined:
    Sep 10, 2010
    Messages:
    3,062
    Likes Received:
    2,872
    Gender:
    Male
    Extremely easy... Go to your dreamweaver:

    Press control + F which will bring up the find and replace box..

    Select Find in "Current document"
    Check the "Use regular expression" checkbox in Option.
    In the find box type "[\r\n]{2,}" without quotes.
    In the Replace box type "\n" without quotes

    Click Replace All and you are done :)

    EDIT: Use notepadd++ if DW hangs..
    For Notepad ++ users, press ctrl+h, select the Regular Expression checkbox and do the same...
     
  8. kingtana

    kingtana Regular Member

    Joined:
    Nov 1, 2008
    Messages:
    277
    Likes Received:
    73
    Location:
    WWW
    Home Page:
    You might need a text file splitter
     
  9. opsil

    opsil Newbie

    Joined:
    Oct 16, 2012
    Messages:
    21
    Likes Received:
    6
    If you have excel, just paste the all text to a list. Then select all lines and use "delete duplicates".
     
  10. seeplusplus

    seeplusplus Power Member

    Joined:
    Aug 18, 2008
    Messages:
    511
    Likes Received:
    163
    Won't Notepad do it? Just highlight * a * empty line whatever and use replace, just leave the replace with field empty. I do this all the time with gEdit.