fork download
  1. import re
  2. text = 'Must-have skills: -.Net programming experience; -2 years experience in C++.'
  3. text = re.sub(r'[!,.:;—](?= |$)', ' ', text)
  4. print(re.sub(r'(?i)(?:(?!\.net\b|\b-\b)[^\w\s])+(?=[^\w\s]*\b)', '', text))
Success #stdin #stdout 0.01s 27800KB
stdin
Standard input is empty
stdout
Must-have skills  .Net programming experience  2 years experience in C++