Batch renaming zipfiles using REGEX

I read some articles here but REGEX is not my forté.

My problem is: I need to rename a set of google drive zip files. I tested and I know that this REGEX here ^([\w\s-]+)(?:-(\d{4}\d{2}\d{2}T(\d+Z)))(-\d*)(.zip) does part of the JOB.

The actual naming of one of those files is Andre machado AT-financas When I apply this regex over this string, for testing purposes, the result is a set of 4 groups and my intention here is having the final name as <Group #1 Group #2 Group #5>.

The problem is that I dont know how to do it. Can anyone help me?

EDIT: Expected output

  • AT-financas

When I apply the REGEX I get:

  • Group #1 - AT-financas Comportamentais
  • Group #2 - 20200923T101614Z
  • Group #3 - 101614Z
  • Group #4 - -001
  • Group #5 - .zip

I have lots of files with that kind of naming rules.