RESearch questions

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

Re: RESearch questions

Postby 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: 312
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 1 time
Been thanked: 9 times

Re: RESearch questions

Postby 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: 4904
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 9 times
Been thanked: 118 times

Re: RESearch questions

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


Return to “General Plug-In Discussions”

Who is online

Users browsing this forum: No registered users and 1 guest