Page 2 of 2

Re: RESearch questions

Posted: Wed 21 Apr, 2010 17:01
by szir

Latest post of the previous page:

Thanks. Just a small note:
In RESearchEng.hlf, RESearchRus.hlf help files the version is still 6.20

Code: Select all

@Contents
$ #Regular Expression Search and Replace, version 6.20#

Re: RESearch questions

Posted: Tue 13 Nov, 2012 11:27
by pepak
I often find myself in need of replacing end-of-line characters with spaces, forming one huge line. Unfortunately, RESearch fails in this scenario:

1) Search from panels works fine, and its multi-line regular expression would be ideal for the purpose. But it can only search, not replace.

2) Replace from panels doesn't have the multi-line regular expression option, so I have to use Several line regexp. Unfortunately, I have yet to discover a search regexp that would work - even something as complete as [\r\n]+ fails, because (in case of CRLF line ends) it only replaces the \n, but leaves \r intact. With unix (LF) line endings, it works, but not completely - a large file (200+ KB) may end up with say two or three lines.

3) Replace from the editor works in this scenario, but tends to eat up available memory quickly (e.g. with a 265 KB file with 2667 lines memory consumption of FAR grows to 733 MB, and often the plugin crashes, taking the whole FAR with it.

I think a "multiline regexp" option for both Panel Replace and Editor Replace would solve these issues.

Re: RESearch questions

Posted: Tue 13 Nov, 2012 11:47
by Shmuel
pepak wrote:3) Replace from the editor works in this scenario, but tends to eat up available memory quickly (e.g. with a 265 KB file with 2667 lines memory consumption of FAR grows to 733 MB, and often the plugin crashes, taking the whole FAR with it.
You could try "Multi-Line Replace" utility contained in "LuaFAR for Editor" plugin. For your example, the memory consumption grows only by 3 MB (e.g. 37 MB -> 40 MB).

RESearch - version 8.6.6 vs. 8.6.7 - different results

Posted: Tue 18 Apr, 2017 10:50
by KlepetoX
I used RESearch as main searching module in FAR, because it gave correct results with using wildcard characters. The new version 8.6.7 has different results (same as standard Find File AltF7).

Here si an example - results with searching all files with "zip" string in the filename "*zip*.*" :

Version 8.6.6 - this is correct, only file or dir name contents "zip" string

Code: Select all

C:\Fox\Ruzne\#Zip
C:\Fox\Ruzne\#Zip\xzip priklad.txt
C:\Fox\Ruzne\Examples\Crate ZIP File in VFP.URL
Version 8.6.7 (or internal Find File) - this is incorrect for me, also extension can content "zip" string, not only filename

Code: Select all

C:\Fox\Ruzne\#Zip                                                 
C:\Fox\Ruzne\Examples\#FolderTreeView\bbfoldertree.zip
x\Ruzne\Examples\Calendar\bed53ef1-4970-4f1a-ad49-da90b1c3e93b.zip
zne\Examples\Calendar\zal\bed53ef1-4970-4f1a-ad49-da90b1c3e93b.zip
x\Ruzne\#MySQL\ODBC\mysql-connector-odbc-noinstall-5.2.7-win32.zip
\Ruzne\#MySQL\ODBC\mysql-connector-odbc-noinstall-5.2.7-winx64.zip
\Ruzne\#MySQL\ODBC\mysql-connector-odbc-noinstall-5.3.4-winx64.zip
\Fox\Ruzne\Examples\OWNER_DRAWN_MENUS\#Source\ownerdrawn_menus.zip
[/b]C:\Fox\Ruzne\#Zip\xzip priklad.txt
C:\Fox\Ruzne\Examples\Crate ZIP File in VFP,URL
Version 8.6.7 finds not matching files, "zip" string is in the extension, not in the filename. I don't know what is wrong or correct. But now RESearch results are the same as standard internal search (AltF7) and I'd prefer older behavior.

Is there any possibility to make RESearch do older searching method?
Or is it possible with internal Find File?

RESearch - version 8.6.6 vs. 8.6.7 - different results

Posted: Tue 18 Apr, 2017 12:12
by Shmuel
Use *zip*|*.zip or /zip.*\.|^[^.]*zip[^.]*$/i.
The second variant will find names such as abzip12.zip (the first variant won't).

P.S.
Sorry, it seems this plugin does not use Far API for matching masks. The above advice therefore is not applicable to RESearch. It is applicable though to Far's "Find File" and to any plugin using Far API for matching masks.

RESearch - version 8.6.6 vs. 8.6.7 - different results

Posted: Tue 18 Apr, 2017 12:26
by HaRT
KlepetoX, are you sure that these RESearch version give different results in the same version of FAR?
I suspect it's the change in FAR that causes the difference, as RESearch likely uses FAR API to match wildcards.

RESearch - version 8.6.6 vs. 8.6.7 - different results

Posted: Tue 18 Apr, 2017 15:59
by KlepetoX
Shmuel - Thanks, the first mask works well in RESearch and in internal find file.
HaRT - yes, the version of FAR is the same (4936). Only RESearch was replaced with the newer version.