Deleteall character from filename before the last underscore _ : Ho to delete all characters up to and including the last underscore `_` before the `.ext` from all filenames recursive in the CWD?

Is this best done by split and replace or regex (`^[^_]+_` ?)? The code below does not work (no erros msg.)

    aaa_bbb_000_xxx.txt   ---> xxx.txt
    __abc123_zzzz.txt     ---> zzzz.txt
    111222.txt            ---> 111222.txt

Code:

    import os

    cwd = os.getcwd()
    
    paths = (os.path.join(cwd, filename)
            for cwd, _, filenames in os.walk('cwd')
            for filename in filenames)
    
    for path in paths:
         newname = path.replace(^[^_]+_)
        if newname != path:
            os.rename(path, newname)

