#1 : 04/12-23 21:49 Jan
Posts: 3
|
I want to remove an email address in parentheses at the end of file names, but I can't get it to work.
This is my starting point (examples): 2023-11-01 (ABC-943064) Kontrolle - Blaurot GmbH ([email protected]).eml 2023-11-29 Re (ABC-943064) Kontrolle - Fritz Zuloff ([email protected]).eml 2023-11-30 Re [ABC-943064] Kontrolle - Blaurot GmbH ([email protected]).eml This is what I want: 2023-11-01 (ABC-943064) Kontrolle - Blaurot GmbH.eml 2023-11-29 Re (ABC-943064) Kontrolle - Fritz Zuloff.eml 2023-11-30 Re [ABC-943064] Kontrolle - Blaurot GmbH.eml I tried 'Replace' with regular expression, but I can't get the right expression. Can anyone help with a regular expression? I need to find this pattern: "space|opening parenthesis|any characters|@|any characters|dot|any characters|closing parenthesis" at the end of the line (name only) Thanks! |
#2 : 05/12-23 18:39 Miguel
Posts: 148
|
Reply to #1: HI Jan.
I have this regex in my small collection. It delete the last word of the name. Replace: ^(.+) .+$ Replace with: $1 It work with the examples you gave us.. Be sure to add a space between the parentesis and the dot |