#1 2025-07-25 11:47

reframer
Member
Registered: 2025-07-25
Posts: 1

Adjust name and take parts from the existing name

Hi all,

I have a filename:
The_Test_Article_No_31_from_22._July_2025

This academic article comes every week or month, so I want:

The Test - 2025-07-22


The easy way would be:
- Insert: The Test - 2025-

And now the rest:
- Find January in the name and replace it with 01
- Or find February in the name and replace it with 02
- And so on

And
- Find any 2 digit number and dot
- Replace it with only the 2 digit numer / delete the dot
- So from 22. to 22


Happy to get some help.

Offline

#2 2025-07-25 17:50

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,491

Re: Adjust name and take parts from the existing name

This can achieved using the following rules:

1) Clean Up: Replace with spaces "." "_", Normalize spaces, Fix spaces (skip extension)
2) Regular Expressions: Replace expression "\s+Article No\s+\d+\s+from\s+" with " - " (skip extension)
3) Reformat Date: Convert to "yyyy-mm-dd" from "d mmmm yyyy", whole words only, skip extension

Input:
The_Test_Article_No_31_from_22._July_2025.pdf

Output:
The Test - 2025-07-22.pdf

Offline

Board footer

Powered by FluxBB