I'm trying to match the following text:
void foo( int xxx,
int const & xxx,
With the regex:
\(\s-+\)[^\s-]+,$
IE: match whitespace, followed by non-whitespace, followed by a single comma at the end of the line
Expected matches:
[space]xxx, (line 1)
[space]xxx, (line 2)
Actual matches:
[space]foo( int xxx, (line 1)
[space]& xxx, (line 2)
Why is emacs matching the spaces midstring even though I've specified 'no space'?