I have a string like the following "blaa...blup..blaaa...bla."
Every part where there is more than one dot must be replaced by "_" but it must have the same amount as replaced chars.
The string should result in: "bla___blup__blaaa___bla."
Notice that the last dot is not replaced as it has not other dots "connected".
I tried using following regex approach in powershell but I always get a legnth of 2 for the match regardless if there where 3 or more dots:
$string -replace '(.)\1+',("_"*'$&'.length)
Any ideas?
