It is required to write the following logic:
Remove from the string all characters except the Latin / Cyrillic letters and "," (comma), and the "-" sign, if it occurs, should be replaced with a space, if there is already a space between the owls, then it must also be preserved .
It turned out to fulfill the first two conditions, but it’s impossible to find and replace "-" ..
/[^ a-zа-яё,-]/ui I would be very grateful for the help