Page 1 of 1

Help with MACRO

Posted: Thu Feb 05, 2009 10:37 pm
by karipay
Hi,

Is there a way i can create a MACRO to search for words and each word will be put it in a new line? Also, each word can repeat multiple times (> 100) and is placed randomly in the text file.

EX. Word1word2word3word4word5word6word2word1word6word99word......

I wanted the result to be like this.
word1
word2
word3
word4
word5
word6
word2
word1
word6
word99
word.....

Thanks in advance!

Posted: Fri Feb 06, 2009 9:01 am
by ben_josephs
How do you define a word? Is it a non-empty sequence of letters, followed by a possibly empty sequence of digits?

IF so, this Search | Replace... (<F8>) will do it:
Find what: [a-z]+[0-9]*
Replace with: \0\n

[X] Regular expression

Replace All
You wrote
each word can repeat multiple times (> 100) and is placed randomly in the text file.
I don't know the significance of this.

Posted: Wed Feb 11, 2009 10:32 pm
by karipay
Sorry bout the confusion but thanks for the idea!