I am trying to replace all of the non-alphanumeric characters AND spaces in the following Python string with a dash -. I tried to use the below code, but it only replaced the non-alphanumeric characters with a dash - and not the spaces.
s = re.sub('[^0-9a-zA-Z]+', '-', s)
Original String: s = 'ABCDE : CE ; CUSTOMER : Account Number; New Sales'
How can Python regex be used to replace both the non-alphanumeric characters AND spaces with a dash - to get the following target outcome?
Target Outcome: s = 'ABCDE---CE---CUSTOMER---Account-Number--New-Sales'