fork(1) download
  1. import re
  2. texts = ['This%%is$Matrix%%$script', 'This$#is% Matrix# %!']
  3. for text in texts:
  4. print(re.sub(r'(?<=[^\W_])[\W_]+(?=[^\W_])', ' ', text))
Success #stdin #stdout 0.03s 9408KB
stdin
Standard input is empty
stdout
This is Matrix script
This is Matrix# %!