RESearch questions

Here you can discuss about your favorite plug-in.
szir
Posts: 8
Joined: Mon 19 Apr, 2010 19:01

Re: RESearch questions

Post by szir » Wed 21 Apr, 2010 17:01

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#

pepak
Posts: 329
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 3 times
Been thanked: 9 times

Re: RESearch questions

Post by pepak » Tue 13 Nov, 2012 11:27

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.

Shmuel
Posts: 5202
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 16 times
Been thanked: 148 times

Re: RESearch questions

Post by Shmuel » Tue 13 Nov, 2012 11:47

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).

KlepetoX
Posts: 101
Joined: Sun 08 Jan, 2012 08:23
Location: Czech Republic

RESearch - version 8.6.6 vs. 8.6.7 - different results

Post by KlepetoX » Tue 18 Apr, 2017 10:50

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?

Shmuel
Posts: 5202
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 16 times
Been thanked: 148 times

RESearch - version 8.6.6 vs. 8.6.7 - different results

Post by Shmuel » Tue 18 Apr, 2017 12:12

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.
Last edited by Shmuel on Tue 18 Apr, 2017 15:05, edited 2 times in total.

User avatar
HaRT
Moderator
Posts: 8076
Joined: Tue 30 Aug, 2005 17:21
Location: Санкт-Петербург
Has thanked: 67 times
Been thanked: 100 times

RESearch - version 8.6.6 vs. 8.6.7 - different results

Post by HaRT » Tue 18 Apr, 2017 12:26

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.
Last edited by HaRT on Tue 18 Apr, 2017 12:27, edited 1 time in total.
Фар есть инструмент, а не нянька. © 2009 DrKnS

KlepetoX
Posts: 101
Joined: Sun 08 Jan, 2012 08:23
Location: Czech Republic

RESearch - version 8.6.6 vs. 8.6.7 - different results

Post by KlepetoX » Tue 18 Apr, 2017 15:59

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.

Post Reply

Return to “General Plug-In Discussions”