functionGet-CsvDelimiter($Path) { # get the header line $headerLine = Get-Content$Path | Select-Object-First1
# examine header line per character $headerline.ToCharArray() | # find all non-alphanumeric characters Where-Object { $_-notlike'[a-z0-9äöüß"()]' } | # find the one that occurs most often Group-Object-NoElement | Sort-Object-Descending-Property Count | # return it Select-Object-First1-ExpandProperty Name }