I
I
i3core2022-03-20 17:18:55
Regular Expressions
i3core, 2022-03-20 17:18:55

Swap the year in the file name with the day of the month in some places?

there is such a file format "whatname_NitroCams_11-07-2021_03-44-00-proxy.ts"
you need to change 2021 and 11 places to get "whatname_NitroCams_2021-07-11_03-44-00-proxy.ts", "whatname" - has a different number of characters, "NitroCams" - constant characters, "11-07-2021_03-44-00" - dates are different, and all characters after the date can also be different, and their number, for example, in "whatname_NitroCams_11-07-2021_03 -44-00-proxy_0001.ts" or "what_NitroCams_11-07-2021_03-44-00_other.ts" etc.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Roma Zvarich, 2022-03-20
@i3core

In the "Text to replace" field, enter:
(\d\d)-(\d\d)-(\d\d\d\d)
In the "Replace with" field, enter:
$3-$2-$1

V
vreitech, 2022-03-20
@fzfx

https://regex101.com/r/8b4Tnt/1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question