import rerx = re.compile(r"^(\w+\s)[\d\s]+")s = "Mywebsite 21 12 34 have 10000 traffic"print( rx.sub(r"\1", s) )
Standard input is empty
Mywebsite have 10000 traffic
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!