I have these URLs
veiculos-sao-paulo-__4--6--.html veiculos-parana__4--6--.html veiculos-rio-de-janeiro-__4--6--.html
With this regular expression:
^veiculos-([a-zA-Z-]+)__.+\.html?
I get the group $ 1 with the following outputs:
sao-paulo-
parana
rio-de-janeiro -
I would like to not receive the hyphen "-" from the end.
How could I adapt my regex to not catch the hyphen, considering that it may or may not come at the end of the url?
desired output:
sao-paulo
parana
rio-de-janeiro