I want to match every '[' or ']' that's not preceded by a backslash in ruby 1.9 I tried:
/?<!\134[\[\]]/
and
/?<!\\\\[\[\]]/
but I get a 'target of repeat operator not specified'
I want to match every '[' or ']' that's not preceded by a backslash in ruby 1.9 I tried:
/?<!\134[\[\]]/
and
/?<!\\\\[\[\]]/
but I get a 'target of repeat operator not specified'
You will need to wrap the negative lookbehind in parenthesis.
(?<!\\)[\[\]]