Regular Expression Help

General discussions about Advanced Find and Replace
Post Reply
Pete Allison
Posts: 8
Joined: Tue Apr 11, 2006 6:46 pm

Regular Expression Help

Post by Pete Allison »

I'm trying to delete several lines of text. An example line always contains

$Revision:

somewhere in the line. If this string is found, I would like to delete the entire line. The actual line is:

* $Revision: $\n

so there are two dollar signs. (Yes, it's a VSS Revision tag.)

I think AFR can do this, if I can figure out the right RE to use.

This is what I have tried so far:

\$Revision*: Changes the line to "n: $"

\$Revision*\r\n: does not match.

I've tried a few other things that did not work as well. I'm a bona-fide newbie at RE!
Thanks,
Pete

Abacre
Site Admin
Posts: 1223
Joined: Mon Jan 31, 2005 5:32 pm

Post by Abacre »

Search for:
^.*\$Revision:.*\r\n

Replace with:
(empty)

^ is the beginning of line.

Modifier M should be checked. Uncheck other modifiers.
Kind regards,
Abacre Limited
http://www.abacre.com
support@abacre.com

Pete Allison
Posts: 8
Joined: Tue Apr 11, 2006 6:46 pm

Regular Expression Help

Post by Pete Allison »

Perfect! You are a genius, Mr. Vasin! And tremendous help!
Pete

Pete Allison
Posts: 8
Joined: Tue Apr 11, 2006 6:46 pm

RE: Regular Expression Help

Post by Pete Allison »

One thing, how do you keep the original file date in batch replace?

I have "Keep original file date" checked on Options, General.

I don't see one for batch.

If batch replace doesn't support this, can I use RE on regular replace? I know it will maintain the original file date.
Pete

Abacre
Site Admin
Posts: 1223
Joined: Mon Jan 31, 2005 5:32 pm

Post by Abacre »

"Keep original file date" on General tab of Options window should work for Batch Replace.
Are you it does not work? Could you send us (support@abacre.com) your
sample file and your default.cfg file located in
C:\Program Files\Advanced Find and Replace
Kind regards,
Abacre Limited
http://www.abacre.com
support@abacre.com

Post Reply