I want to select/visualize a regexp GROUP in a vim regexp expression in vim.
By example I would like to highlight (search) a span of characters inside square brackets, having this line:
bla bla bla [Corso De Stefanis 88 interno 4](address) blabla
I would like to just select this sequence of chars:
Corso De Stefanis 88 interno 4
So I tried the regexp
/\[\(.\{-}\)\]
Where the aim is to have the regexp GROUP \(.\{-}\)
contained in sqare brackets. But in this case I select the pattern including square brackets (see screeenshot).
And if I specify the referenced group with \1
, the search fails:
/\[\(.\{-}\)\]\1
Where I'm wrong?