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

how to delete certain things out of lines?

Discussion in 'Black Hat SEO Tools' started by outsidethesquare, Oct 30, 2010.

  1. outsidethesquare

    outsidethesquare Regular Member

    Joined:
    Sep 9, 2009
    Messages:
    269
    Likes Received:
    159
    I have a list of about 300k URLS and its in this form

    xxxx
    yyyy
    zzzz
    zzzz/lalaa/dasdasdasd


    My question is, is there any way that I can get a tool that will delete everything after the / in all lines containing a / ?

    So the list above would become

    xxxx
    yyyy
    zzzz
    zzzz/


    Thanks in advance.
     
    Last edited: Oct 30, 2010
  2. blackstone37

    blackstone37 Jr. VIP Jr. VIP Premium Member

    Joined:
    Jul 23, 2009
    Messages:
    355
    Likes Received:
    120
    Occupation:
    Diamond and Jewelry Wholesaler
    Location:
    Chicago
    Excel or even notepad will do this. Use the "find and replace" tool. Just replace the / with a space (spacebar)....done.

    Edit- didn't see that last / after z. Excel is the way to go probably. You would need to set up a formula. Online guides everywhere for that.
     
    Last edited: Oct 30, 2010
  3. outsidethesquare

    outsidethesquare Regular Member

    Joined:
    Sep 9, 2009
    Messages:
    269
    Likes Received:
    159
    That doesn't help me because if i replace the / with a space, then I will just be left with zzzz lalala asdasdasd instead of zzzz/lalala/asdasdasd but what I need is to be left with either zzzz or zzzz/
     
  4. Charas

    Charas Registered Member

    Joined:
    Apr 15, 2009
    Messages:
    61
    Likes Received:
    14
    I'm not 100% sure I understand the question but if they are URLs couldn't you just load them into scrapebox and press trim to root to do this? If they don't have the http in front you could easily add it first in excel.
     
  5. tacopalypse

    tacopalypse Executive VIP Jr. VIP Premium Member

    Joined:
    Nov 30, 2009
    Messages:
    980
    Likes Received:
    2,485
    Home Page:
    in excel, you use 'instr' to get the location of the first /
    then use 'left' to extract everything to the left of it
     
  6. outsidethesquare

    outsidethesquare Regular Member

    Joined:
    Sep 9, 2009
    Messages:
    269
    Likes Received:
    159
    This is what I need. I don't know how to set up the formula.

    If I have all of the URLs in column A, how do I set up the formula?

    Sorry to be so noobish about this lol.
     
  7. mazgalici

    mazgalici Supreme Member

    Joined:
    Jan 2, 2009
    Messages:
    1,489
    Likes Received:
    881
    Home Page:
    Scrabebox can do this, has an option Trim to root for URLs
     
  8. erascal

    erascal Junior Member

    Joined:
    Nov 7, 2008
    Messages:
    129
    Likes Received:
    108
    Text to column in excel will do the trick without having to input a formula.
     
    • Thanks Thanks x 1
  9. peterlolz

    peterlolz Junior Member

    Joined:
    Jan 27, 2009
    Messages:
    135
    Likes Received:
    479
    Hey,
    Check out my tool. It is able to replace things in lines that match a regex plattern (regex makes everthing possible). Things like "2ndName, Firstname" to "Firstname 2ndName" are also possible.

    If you want this PM me.


    Here a demo:

    http://www.youtube.com/watch?v=Bai2xoMIjdQ