How to select multiple lines

Andrew Hood ajhood at fl.net.au
Wed Sep 9 00:19:45 CEST 2009


Eric Bouyoux wrote:
> Hi,
> 
> Thank you for all the explanations.
> I knew I could use keywords (module and endmodule) and then the ^M key
> (go to matching).
> These 2 keywords are not recognized in my nedit environment but I know
> how to make it work.
> But I wanted something more general such as Matthijs van Aalten's
> regular expression in a "Replace" window  "(?n(^module toto
> ;\n).*(^endmodule\n))" but it does not exactly works the way I want. It
> starts from the first "module" found and goes to the very last
> "endmodule" in the file. I want it to stop at the FIRST "endmodule"
> encountered.
> I tried several changes in the reg exp but I could not make it work.
> Any idea ?

You could be running up against the maximum size of a regex match. You
can not find/replace a string longer that that limit.

In nedit.h it says:

#define SEARCHMAX 5119          /* Maximum length of search/replace
strings */

Change it to something bigger - I user 65535 with no obvious ill effects
- and recompile.

-- 
There's no point in being grown up if you can't be childish sometimes.
                -- Dr. Who


More information about the Discuss mailing list