Remove pattern
Hi all, I need help from community :)
I've multiple files like these:
Here the name (Europe) (En,Fr,De,Nl).ext
here another name (Europe) (Fr,De).ext
and another one (ASIA) (Jp,Hk,Ph).ext
and I need:
Here the name (Europe).ext
here another name (Europe).ext
and another one (ASIA).ext
basically I need to remove (En,Fr,De,Nl) (Fr,De) (Jp,Hk,Ph) that are obviosuly not the same for each file.
I was trying something like (*,*) considering that there is always a comma between parenthesis but it doesn't work also using regular expression.
Do you have any suggestions on how to do this?
Thanks in advance for any help
I've multiple files like these:
Here the name (Europe) (En,Fr,De,Nl).ext
here another name (Europe) (Fr,De).ext
and another one (ASIA) (Jp,Hk,Ph).ext
and I need:
Here the name (Europe).ext
here another name (Europe).ext
and another one (ASIA).ext
basically I need to remove (En,Fr,De,Nl) (Fr,De) (Jp,Hk,Ph) that are obviosuly not the same for each file.
I was trying something like (*,*) considering that there is always a comma between parenthesis but it doesn't work also using regular expression.
Do you have any suggestions on how to do this?
Thanks in advance for any help
Reply to #1:
Hi Stefano,
I'm surprised our resident Italiano expert, Styb, hasn't jumped on this post already... Anyway, I'll take a stab at it, and he'll probably come and show you the right way to do it later. :)
First (and you probably already realize this), you can't have two files with the same name (Europe).ext for instance. Easy enough to fix with a collision rule though.
Second, using a remove pattern method, it's just:
Replace: .*$
[NOTE: There's a SPACE before the period! Without a space before the period it won't work - so put in quotes it looks like " .*$" (leave out the quotes of course)]
Use regular expressions: CHECKED
Apply to: Name
Best,
DF
Hi Stefano,
I'm surprised our resident Italiano expert, Styb, hasn't jumped on this post already... Anyway, I'll take a stab at it, and he'll probably come and show you the right way to do it later. :)
First (and you probably already realize this), you can't have two files with the same name (Europe).ext for instance. Easy enough to fix with a collision rule though.
Second, using a remove pattern method, it's just:
Replace: .*$
[NOTE: There's a SPACE before the period! Without a space before the period it won't work - so put in quotes it looks like " .*$" (leave out the quotes of course)]
Use regular expressions: CHECKED
Apply to: Name
Best,
DF
Reply to #1:
Good morning, guys!
I'm unable to understand the DF's solution, but I've found another way to achieve the desired result using the Replace method and regular expressions.
Replace: (.*) (.*)
Replace with: \1
See the following picture:
https://i.postimg.cc/yYjKBYZy/Img192.png
Good morning, guys!
I'm unable to understand the DF's solution, but I've found another way to achieve the desired result using the Replace method and regular expressions.
Replace: (.*) (.*)
Replace with: \1
See the following picture:
https://i.postimg.cc/yYjKBYZy/Img192.png
Reply to #3:
Hi Styb,
Well, my face is red... I misinterpreted the filenames. Your way is right, of course.
Best,
DF
Hi Styb,
Well, my face is red... I misinterpreted the filenames. Your way is right, of course.
Best,
DF
Reply to #4:
It also happens to the best men. :)
It also happens to the best men. :)