• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

How to list every word?

Cappuccino

Diamond Member
Hi sorry I don't know where to post this but w/e

Basically how do I list every word? For example I want to copy and paste this for example I copy and paste this http://gyazo.com/bce9a96cf72fb5c208079b9862184491
and when I paste it looks like this http://gyazo.com/7c53e04a9bd7092502515e2ecb77ffbd
BUT I want every word to be in list form like this
http://gyazo.com/7940213844e8a2650120e182426b8010

How do I copy something and paste it but in single words underneath each other? I really appreciate the help 😉
I hope you understand what I mean.
 
Paste into Word (don't think it works with another text editor)

Open find/replace, and replace " " (space) with "^l" which is a special code to force a line break

pay me 500 dollaridoos
 
Paste into Word (don't think it works with another text editor)

Open find/replace, and replace " " (space) with "^l" which is a special code to force a line break

pay me 500 dollaridoos

Pretty much every text editor has search and replace now.
 
I could give you some ViM commands.

Code:
:%s/[^a-zA-Z]/ /g
:%s/  */\r/g

If you were on Linux you could add:

Code:
:!sort -u

But ViM is likely to frustrate you. It's a modal text editor.
 
Run this from a unix terminal:

perl -p -i.bak -e "s/ /\n/g" filename

You're question is an example of why lots of people who work with computers prefer unix for productivity.

"s/a/b/g" is a global regular expression which replaces all instances of "a" with "b", in this case " "(space) with "\n"(newline). Perl can interpret and perform this in one line if you use a few flags, -p and -e with -i.bak creating a backup of the original file in case you write a bad regex.

If you're stuck with windows, use a text editor with "find and replace". Although I'm not sure which programs can add newlines.
 
Last edited:
Run this from a unix terminal:

perl -p -i.bak -e "s/ /\n/g" filename

You're question is an example of why lots of people who work with computers prefer unix for productivity.

"s/a/b/g" is a global regular expression which replaces all instances of "a" with "b", in this case " "(space) with "\n"(newline). Perl can interpret and perform this in one line if you use a few flags, -p and -e with -i.bak creating a backup of the original file in case you write a bad regex.

If you're stuck with windows, use a text editor with "find and replace". Although I'm not sure which programs can add newlines.

The perl expression works in windows with ActivePerl just fine though it needs to be formatted slightly different.

Install ActivePerl, open the folder with the file in a command window and use:
"<path to Perl>\Perl -p -i.bak -e "s/ / \n /g" <filename>

For some reason the windows command line doesn't like the /\n/
 
I'm sure there is a simple way to do it with a .bat file.
I remember doing massive file renaming and txt file routines with simple 1-2 line BAT files.
 
Back
Top