name: 'value' ^^^^
I want to see the
name in a different color.
My expression looks like this:
syn match label "\<[a-zA-Z_$][a-zA-Z_$0-9]*[ \t]*:[^=:]\="
The idea is to avoid seeing
name as a
label if the colon is immediately followed by an equal (
=) or a colon (
:) as in these two lines, the highlight should not happen:
However, my current expression fails in this situation:
name:'value' ^ | +--- no space here
The effect is that the string (
'value') doesn't get highlighted as expected since the first quote (
') is viewed as being part of the
How do I test that an expression is not followed by another without eating that expression?