Greater than symbol ">" behavior in substitution

Hi guys,

I’m working with HTML and I have mixed format links:
<a href="#">Foo</a>
<a href="#" target="_blank">FooBoo</a>

I need all the external links to be:
<a href="#" target="_blank">FooBoo</a>

I used:
:%s/<a href=\(".{-}"\)>/<a href=\1 target="_blank">/gci
But that generates:
<a href="#" target="_blank">Foo</a>
<a href="#" target="_blank" target="_blank">FooBoo</a>

Now the problem is that “>” matches :
<a href="#" target="_blank">
Apparently the search pattern takes < as literal but the > as special character specifying whole word.

How can I make > behave like literal? I tried \> and > none of but none works.

Found this:

I also found about magic and very magic but it didn’t help:
\v, \V, \m, \M

Thanks in advance.

The > already taken as literal. The .{-} matched too much.

It should be :%s/<a href=\("[^"]\{-}"\)>/<a href=\1 target="_blank">/gci

Now I see it.

Got it, thank you very much.

Do you have any recommendation of where to learn more about regex?
The issue is solved.