Regxt - renaming help needed Please

Questions and answers on how to get the most out of FFAStrans
Post Reply
APerson
Posts: 12
Joined: Wed Sep 18, 2019 11:13 am

Regxt - renaming help needed Please

Post by APerson »

Hello,

I've read the forum on the regext syntax but i am still having problems.

I'm trying to rename a file. I have a software that structures some files and spits it out with random gibberish names.

My aim is to remove said gibberish.

the names are written like this.

67cfd049-8519-4bc4-9404-951fce1e5203_MIX_PRO.txt

If it was one file, i would just rename it myself but, its over 1000.

the only useful part of the title is MIX_PRO, however, it does not always start with MIX, it can be anything, only identifier i saw was the _ before actual title.

is there a way for me to use regext to set a variable to the name after the _ (underscore) and remove all characters before it.


i would really appreciate the help.

i know i may have used this forum incorrectly before, but i really need support on this, ive been trying many things for hours and got no where.



- Ash Person
momocampo
Posts: 595
Joined: Thu Jun 08, 2017 12:36 pm
Location: France-Paris

Re: Regxt - renaming help needed Please

Post by momocampo »

Hi,
If you are sure to keep all strings FROM _ , you can use /_.+/
It will keep all after the first "underscore"(_).
Cheers.

Benjamin
APerson
Posts: 12
Joined: Wed Sep 18, 2019 11:13 am

Re: Regxt - renaming help needed Please

Post by APerson »

Like this?

$regext("%s_original_name%","/_.+/")

but this deletes the whole string and keeps only the extenstion
momocampo
Posts: 595
Joined: Thu Jun 08, 2017 12:36 pm
Location: France-Paris

Re: Regxt - renaming help needed Please

Post by momocampo »

No, you must remove / and / The good expression is "_.+"
APerson
Posts: 12
Joined: Wed Sep 18, 2019 11:13 am

Re: Regxt - renaming help needed Please

Post by APerson »

Thanks so much it worked
Post Reply