> I think a screen capture would do it more justice:
It did, thanks :-)
> So, my match string is catching the left side of the equal sign and
> classifying it as an attribute. Then I want to match the right side.
> I'm able to match a single IP address / subnet, but the rest of the text
> goes without highlighting. I could match to the end, but I'd prefer to
> leave the comma or hyphen without highlights (it's an OCD thing).
I'd say it's pretty basic attention to detail, nothing extraordinary. To
implement it you define a general mode that would include IP addresses,
literals and everything else:
{
begin: /=/, end: /\s/, excludeBegin: true, excludeEnd: true,
keywords: {
literal: 'no' // space separated list of literals
}
contains: [
{
begin: /\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/, // IP address
className: 'number',
},
]
}
(The `end: /\s/` part assumes there can't be spaces with the value part.)