Page 1 of 1

Thousands of files to search

Posted: Mon Jan 31, 2005 5:32 pm
by mcharbonneau
Hi, I have thousands of text files to search. Each file is a text file with the 1st line looking like:

Return-path: <testprefix@somedomain1.com>

I want to write a Find expression to identify all files that have the text "Return-path:" on the same line as "somedomain1.com".

I also want to write the expression such that I can seach for multiple such conditions at once.
Example:

Find all the files that:
have "Return-path:" on the same line as "somedomain1.com" OR
have "Return-path:" on the same line as "somedomain2.com" OR
have "Return-path:" on the same line as "somedomain3.com" OR
have "Return-path:" on the same line as "somedomain4.com" OR
.... you get the idea.

I've gone through the posts but I can't seem to make this work. If you look at my sample 1st line above, I think that the space is giving me grief or maybe my Modifiers are wrong. ??

Thanks for any help.
Marc

Posted: Mon Jan 31, 2005 5:32 pm
by Abacre
Hi Marc,

In fact it's the "trickiest" or "weakest" part of regular
expressions. AFR uses a classical regular expressions syntax.
So operation OR is not possible with classical r.e. You may do OR for
chars (use [] ) but not for strings.
What we think: we probably will modify (upgrade) classical r.e. by
introduction of new syntax element for OR operation.

The second variant: maybe we should develop some kind of sub-operation
(action) or parameter behind of r.e. like we have it in Replace tab.


Probably we will find some solution during this or next week.

Expression to use for this Find (without the OR)

Posted: Mon Jan 31, 2005 5:32 pm
by mcharbonneau
Hi,

Would someone be able to provide me with the Find expression that would work for us? Disregarding the need for multiple conditions with the "OR" operator, how would I write this Find?

Thank you.
Marc

Posted: Mon Jan 31, 2005 5:32 pm
by Abacre
Hi,

If you want to find the following:

all files having Return-path: and somedomain1.com on the same line, you should use Batch replace operation (in find mode: "Just find" option should be ON) with "Use regular expressions" enabled.
Modifier S should be OFF.

So put the following text into search for field:
Return-path:.*somedomain1\.com.*$

In terms of regular expressions:
.* means any even empty char.
$ means end of line.
we use \. to escape reserved char . (dot).

If you are sure that Return-path: is at the beginning of the line you may use search for:
^Return-path:.*somedomain1\.com.*$

Where ^ means begin of line.

In fact if in your original message you have to search for somedomain1.com, somedomain1.com, somedomain3.com
(it's really one digit) then you would use
^Return-path:.*somedomain\d\.com.*$
where \d means exactly one digit.

I hope it will help.

Thanks it works. Can't seem to copy all files found?

Posted: Mon Jan 31, 2005 5:32 pm
by mcharbonneau
Hi,

Thank you very much, this Find expression works well to identify many files.

From the Find results, I would now like to be able to copy (or cut) these files to put them in another folder. This software only allows me to copy/cut one file at at time from the results window. Any suggestions?

I tried right-mouse-clicking and selectiong the Send To option but it still indicates "Register", which I have. ??

Suggestions?
Thanks
Marc

Re: Thanks it works. Can't seem to copy all files found?

Posted: Mon Jan 31, 2005 5:32 pm
by Abacre
mcharbonneau wrote:Hi,
From the Find results, I would now like to be able to copy (or cut) these files to put them in another folder. This software only allows me to copy/cut one file at at time from the results window. Any suggestions?

You may select several files by pressing Ctrl and then you may drag and drop several files using mouse.

mcharbonneau wrote:I tried right-mouse-clicking and selectiong the Send To option but it still indicates "Register", which I have. ??

This is some kind of issue. It worked fine on NT, ME, 2000 systems but it shows "Register" on XP. We will try to fix it soon.

Drag and drop

Posted: Wed Feb 02, 2005 2:20 am
by mcharbonneau
Thanks. Drag and drop works perfectly.

FYI, I use Windows 2000 Pro workstation and have the Send To "Register" problem.

Regards,
Marc