Reputation: 30434
some text i dont care about, some_text_I_want,
<bunch of spaces> some_text_I_want,
I want my pattern to match second line, not first line. Basically wherever some_text_I_want,
is not preceeded with a ,
Upvotes: 2
Views: 286
Reputation: 73006
A negative lookbehind assertion is straightforward:
\v(,\s*)@<!some_text_I_want
Upvotes: 0
Reputation: 72726
How about:
\([^ ,]\|^\)\s*some_text_I_want
?
The bit in brackets looks for a character that isn't a space or a comma, or alternatively the start of the line. Then there is an allowance for any spaces and the text you want.
Upvotes: 1