I'm trying to match a regex with the following phrases:
RENT3 - LOCALIZA
HGRE11 - FII HG REAL
HGLG11 - FII CSHG LOG
HGBS11 - FII CSHGSHOP
KNRI11 - FII KINEA
NTCO3 - GRUPO NATURAON NM
ITUB3 - ITAUUNIBANCO
ITSA4 - ITAUSA
ITSA4 - ITAUSA
I have trying using \s-\s(\w+)\w*$ and at the moment is getting some lines as you can check in this example:
https://regex101.com/r/I4JkVP/2
How can I getting all lines?
My objetive with this regex is to remove all words after the first word, for example:
RENT3 - LOCALIZA
after keeps only word: "RENT3".