Page 1 of 1

Is this possible? (Regular expressions)

Posted: Wed May 04, 2005 9:21 pm
by transient
I've been trying without any success to get the following operation to work:

find: phantom1234{Backspace}{Backspace}{Backspace}{Backspace}

replace to: phantom

I'm beginning to think thas's not possible to be done so I decided to post here. I'll buy this software if I can get it to work


Posted: Wed May 04, 2005 9:48 pm
by Abacre

I suppose that it's not Backspace but it's new line. Isn't it?
In fact if you used Replace operation: AFR removes trailing spaces by
default. So instead of
find: phantom1234{Backspace}{Backspace}{Backspace}{Backspace}
it was considered as phantom1234
In order to switch off this "feature" go to main menu - Action -
Options - Replace and uncheck "Remove trailing spaces".
But then you have to be sure about how many trailing spaces do you

Second, maybe more reliable variant:
use Batch replace
so go to Batch replace tab and check ON: "Use regular expressions"
then put into search for:
and into replace with:

so in Windows \r\n\ is used as return and new line chars.

Does it work now?

Posted: Wed May 04, 2005 10:34 pm
by transient
Roman wrote:I suppose that it's not Backspace but it's new line. Isn't it?

nope, that's what the actual text looks like, namely this:


what I'm trying to do is to get the program to delete the {Backspace} strings and one character immediately preceding it. The closest I came to getting it right was to type this into the batch replace:

search for: \S{Backspace}
replace with: (this field I just leave blank)

then if I have this:


I'll end up with this:


which is precisely what I want to do. The problem arises when I have more then one {Backspace} in sequence. When I have this:


I'll end up with this:


the final text needs to be the word phantom.. Any ideas?

Posted: Fri May 06, 2005 11:35 pm
by Abacre
Try this:

Search for:

Replace with:

Modifier S: OFF
Modifier G: ON

I verified it works perfectly.