how to delete certain things out of lines?

outsidethesquare

Regular Member
Joined
Sep 9, 2009
Messages
268
Reaction score
164
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:
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:
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.

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/
 
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.
 
in excel, you use 'instr' to get the location of the first /
then use 'left' to extract everything to the left of it
 
in excel, you use 'instr' to get the location of the first /
then use 'left' to extract everything to the left of it

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.
 
Scrabebox can do this, has an option Trim to root for URLs
 
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.

Text to column in excel will do the trick without having to input a formula.
 
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
 
Back
Top