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 » Tue May 02, 2006 9:08 pm

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: 1198
Joined: Mon Jan 31, 2005 5:32 pm
Contact:

Post by Abacre » Wed May 03, 2006 7:11 am

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 » Wed May 03, 2006 1:38 pm

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 » Wed May 03, 2006 1:49 pm

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: 1198
Joined: Mon Jan 31, 2005 5:32 pm
Contact:

Post by Abacre » Wed May 03, 2006 4:05 pm

"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

Who is online

Users browsing this forum: No registered users and 1 guest