I am trying to highlight lines like these:
-> Some text without a domain
-> Some other text with a domain (example.com)
I would like:
a) the leading "->" not to be highlighted;
b) the text to be highlighted with, say, Underlined
;
c) and the domain if given to be highlighted with, say, Comment
.
This achieves (a) and (b) but not (c):
syntax region MyLink start=/^-> /hs=e end=/\v(\s\(\a+[.]\a{2,3}\))?$/he=s-1
highlight link MyLink Underlined
syntax match Domain /\v\(\a+[.]\a{2,3}\)/
highlight link Domain Comment
I have tried add contained
and contains
etc but haven't quite found the right answer.
Any help much appreciated!