Page 1 of 1

finding '\n'

Posted: Tue Jul 08, 2003 3:44 am
by nihilo
I am trying match on end of line characters using regex \n, but the search finishes without finding any, even though my file is 50 lines long. This is in latest standalone oxygen, on linux. Any ideas what is going on?

Posted: Wed Jul 09, 2003 9:56 am
by Dan
For performance reasons the find is done iterating one line at the time. The pattern is matched always against a single line.

To support newlines in the pattern we would have to read the entire document into the REGEXP engine. This increase the memory consumption, and this is not an option. We will try to find a solution.

Finding blank lines

Posted: Thu Jan 29, 2004 9:34 pm
by jmakeig
If it searches line by line, how do I find and delete blank lines?

Posted: Fri Jan 30, 2004 11:29 am
by Dan
The replacement is done within one line at a time. If the line is empty, the result of the replacement is also empty, but the line will not be erased.

I recommend to use the "Format and Indent" action from the toolbar. It removes the empty lines.

Posted: Wed Feb 04, 2004 1:39 am
by catterall
At present you have to drop out of Oxygen and use something like BBedit on Mac or Windows, or awk/gawk on unix. Tedious, but it works.

The memory solution in Oxygen would be a sliding window, possibly configurable to a max. number of end-of-lines in a window. Tedius and probably slow, as window overap would be required - slide the window on one line at a time. Surely someone has already coded this, in Perl at least.

Ron