Marc Weber wrote:
Hi Tony.
Of course this was a trivial example.
I was grepping the output of jar -> content-texfile to find the packages
of a java-class.
Currently I'm using this function.
I'm invoking this function for up to 40 files or more.. That depends on
how many modules I have imported.
  let type_pattern = 
'\zs\('.func_name.'\)\%(\s*,\s*\%('.func_name.'\)\)*\ze\s*::'
    if line =~ type_pattern
This is no longer that simple.
But I can do a deepcopy and use filter.. But then I'll no longer able to get
the line numbers.. My question was meant to be more general as my example given in the last
post.

Greetings Marc

When you don't need backrefs, use \%( rather than \( -- it may be marginally faster.

I still don't see the advantage of compiling regexps while scripts remain interpreted.


Best regards,
Tony.

Reply via email to