GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   need help with some text formating (https://gfy.com/showthread.php?t=765286)

zentz 09-01-2007 10:33 AM

need help with some text formating
 
I have a long list like this:

collumn1|collumn2|collumn3|collumn4|collumn5|collu mn6|
2.6.190.56|2.6.190.63|33996344|33996351|GB|United Kingdom|
3.0.0.0|4.17.135.31|50331648|68257567|US|United States|
4.17.135.32|4.17.135.63|68257568|68257599|CA|Canad a|
4.17.135.64|4.17.142.255|68257600|68259583|US|Unit ed States|
4.17.143.0|4.17.143.15|68259584|68259599|CA|Canada |
4.17.143.16|4.18.32.71|68259600|68296775|US|United States|
4.18.32.72|4.18.32.79|68296776|68296783|MX|Mexico|
4.18.32.80|4.18.40.135|68296784|68298887|US|United States|
4.18.40.136|4.18.40.143|68298888|68298895|CA|Canad a|
4.18.40.144|4.18.65.255|68298896|68305407|US|Unite d States|
4.18.66.0|4.18.67.255|68305408|68305919|MX|Mexico|
4.18.68.0|4.18.100.31|68305920|68314143|US|United States|

Now i want to remove the collumn1, collumn2 and collumn5 so i get this format:

|collumn3|collumn4|collumn6|
|33996344|33996351|United Kingdom|
|50331648|68257567|United States|
|68257568|68257599|Canada|

What is the easiest way to do this? Are there any tools for stuff like this?

Thank you!

viki 09-01-2007 10:47 AM

Import the list into Excel or another spreadsheet program and choose | as the delimiter... then just delete the columns you don't want.

zentz 09-01-2007 11:03 AM

ok now i got another problem. the list looks like this:

33996344|33996351|United Kingdom|
50331648|68257567|United States|
68257568|68257599|Canada|
68257600|68259583|United States|
68259584|68259599|Canada|
68259600|68296775|United States|
68296776|68296783|Mexico|
68296784|68298887|United States|
68298888|68298895|Canada|
68298896|68305407|United States|

but i need to add the | in the beinning of each line like this:

|33996344|33996351|United Kingdom|
|50331648|68257567|United States|
|68257568|68257599|Canada|

Any ideas?

RedShoe 09-01-2007 11:04 AM

open it back up in excel and add a new column to the left of your data? Would that work?

martinsc 09-01-2007 11:07 AM

Quote:

Originally Posted by RedShoe (Post 13019692)
open it back up in excel and add a new column to the left of your data? Would that work?

yup, insert a new column on the left and drag with CTRL the | sign all the way down

RedShoe 09-01-2007 11:07 AM

if that WON'T work, then maybe open in excel, add a column and add a character that you know you can mass replace something like:

zzzz|33996344|33996351|United Kingdom|
zzzz|50331648|68257567|United States|
zzzz|68257568|68257599|Canada|

Then just do a mass search and replace for "zzzz" it will remove the "zzzz" and leave a pipe.

yes? no? maybe so?

zentz 09-01-2007 11:13 AM

ok thanks every1 it worked!

viki 09-01-2007 11:15 AM

Or open it up in a text file, find

"|
"

(that would be the pipe at the end of one line and an enter key

and then replace with

"|
|"

There are tons of ways to do this - find, replace, cut, copy, and paste are all your friends.


All times are GMT -7. The time now is 12:10 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123