Note: I am not looking for a working substitution for my command (allready have that), but for an explanation.
I have the following code:
include <stdio.h>
char ga[] = "abcdefghijklm";
void my_array_func(char ca[10]);
void my_pointer_func(char *pa);
int main()
{
/* code */
return 0;
}
and use the following search on it:
/^$\n\(^.*\n\)\{-}\ze$\nint main
Which should match:
void my_array_func(char ca[10]);
void my_pointer_func(char *pa);
But it doesn't. It does match all possible lines above. In this case:
char ga[] = "abcdefghijklm";
void my_array_func(char ca[10]);
void my_pointer_func(char *pa);
If I add more lines which are fitting to the pattern it matches them too.
So it behaves exactly the same if I replace \{-}
with *
.
If I use the count directly (\{2}
instead of \{-}
) I get the result as expected.