[Python] regex replace numbers between to characters

Discussão em 'Python' iniciado por Stack, Abril 8, 2025.

  1. Stack

    Stack Membro Participativo

    I have a string 'manual__2025-04-08T11:37:13.757109+00:00' and I want 'manual__2025-04-08T11_37_13_00_00'

    I know how to substitute the : and + using

    'manual__2025-04-08T11:37:13.757109+00:00'.replace(':','_').replace('+','_')


    but I also want to get rid of the numbers between the two characters '.' and '+'.

    I'm using python.

    Continue reading...

Compartilhe esta Página