Automating Deleting of Specific Entries

R

Ralph

There are these certain entries, date/time stamp entries to be axact, on some
documents that I use that I would LOVE to be able to automatically remove
them all with some cool macro or something but I'm not too good with these
things. Here is a sample of the text:

"[4/9/2005 2:30:33 PM] <ht> On 3/29 MG775 fell below sma200.. and stayed
there for the last week.. waiting for another shoe to drop.
[4/9/2005 2:31:55 PM] <ht> Thursday AH USFC lowered Guidance .. a lot. They
cited 3 reasons for the shortfall.
[4/9/2005 2:32:17 PM] <ht> Top was slower Auto Sector business."

What I would love to be able to remove automatically from these entries are
these parts "[4/9/2005 2:30:33 PM] <ht>", "[4/9/2005 2:31:55 PM] <ht>",
"[4/9/2005 2:32:17 PM] <ht>"

A solution to this problem would be very gratefully appreciated, would make
my life all the easier.

THANKS!!
 
K

Klaus Linke

Hi Ralph,

A wildcard replacement would do the trick.

<ht> is a horizontal tabulator?

Then "Edit > Replace", check "Match wildcards,
Find what: [!^13]@^t
Replace with:
would delete everything up to and including the first tab in every paragraph.

"Safer" replacements:
Find what: \[*\] ^t
Replace with:
(delete everything in square brackets and followed by a space and a tab)

Find what: \[[0-9 /:APM]@\] ^t
Replace with:
as before, but would only match square braces containing numbers, spaces, "/", ":" or the letters A, P, M.

Greetings,
Klaus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top