Hello. First off I want to apologize because I already posted in
microsoft.public.word.word97vba but upon further research, I think
this is the better newsgroup for this issue.
I'm really learning macros to work with this current project. I
have tons of logs with lines looking like:
unknown (serv-2-4-73.lycos-vds.com ): 15 Time(s)
All I want from lines like these are
(serv-2-4-73.lycos-vds.com ): 15
I'm sure its very easy, but how would I delete all text (including
white space at the beginning of a line) before the first "(" and
"Time(s)" for a line? I'm sure a simple macro can do the job.
Thanks in advance,
Blake
btw, I've spent a good chunk of time researching this and feel rather
stupid for not finding a solution yet.
Tony Jollans - 06 Apr 2006 18:27 GMT
You can use a macro if you like - just record yourself doing this.
Ctrl+H to get the Find and Replace dialog
Find: *([\(][!\)]@[\)]: [0-9]@) *^13
Replace: \1^p
Check Use Wildcards
Hit Replace all
This assumes your lines end in paragraph marks - if they end in manual line
breaks change ^13 in the find string with ^l (caret, lowercase-L) and ^p in
the replace string also to ^l
--
Enjoy,
Tony
> Hello. First off I want to apologize because I already posted in
> microsoft.public.word.word97vba but upon further research, I think
[quoted text clipped - 19 lines]
> btw, I've spent a good chunk of time researching this and feel rather
> stupid for not finding a solution yet.