tags:

views:

41

answers:

2
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 ,

+1  A: 

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.

Al
A: 

A negative lookbehind assertion is straightforward:

\v(,\s*)@<!some_text_I_want
Brian Carper