import re a = """02/07/2023, 14:52TestTestFin""" match = re.sub(r'[^ ]\n(.+)\n' + 'Fin' +'\n',r'** \1 **', a)print(match)
Standard input is empty
02/07/2023, 14:52 Tes** Test **
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!