I need to remove the dashes between characters only but the way I'm doing it I need to run two separate replaceAll commands - is there a way to do it with just one? It must allow for French characters.
.replaceAll("([a-zA-ZÀ-ÿ])-([a-zA-ZÀ-ÿ])", "$1 $2")
The desired outcome is from this:
Pourquoi s'intéresse-t-elle à lui.
Ma chère je comptais là-dessus - figurez-vous.
Il y a 1-2 chemins que nous pouvons choisir.
to this:
Pourquoi s'intéresse t elle à lui
Ma chère je comptais là dessus - figurez vous.
Il y a 1-2 chemins que nous pouvons choisir.
With the above pattern I can only fix the second sentence or with an adjustment, the first sentence but I want to fix them both with one pattern..
Regex to match the first sentence:
https://regex101.com/r/fHQNYP/1
and to match the second sentence: