import retext = "hey a2a 3beauty hou\se heyYou2"print(re.sub(r"\s*(?<!\S)(?![a-zA-Z][a-zA-Z0-9]*(?!\S))\S+", "", text))
Standard input is empty
hey a2a heyYou2
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!