Hi,
I have renamed my files regarding certain categories by having few letters in the beginning of the file ends by # and the rest of the name .
for example:
abc#aaaafffffsaaa.jpg
RRRRR#kkkffff srrrwwww ww.avi
.... etc
Now in order to have some operation like filtering, distinct, unique...etc) regarding first part before the #, I need to create a new column holding that part, as in my example column will be:
abc#
RRRRR#
.... etc
Thank you
New column displaying a part of filename
-
NotNull
- Posts: 5961
- Joined: Wed May 24, 2017 9:22 pm
Re: New column displaying a part of filename
If you want the Category to include the #:
Without the #:
Code: Select all
regex:^(.+?#) add-column:A A-label:=Category A:=regmatch1: Code: Select all
regex:^(.+?)# add-column:A A-label:=Category A:=regmatch1: -
sk2107
- Posts: 385
- Joined: Sun Aug 07, 2022 8:48 pm
Re: New column displaying a part of filename
Great. thank you,
Can I add another column to have the length of the result (len of A column)
Best regards
Can I add another column to have the length of the result (len of A column)
Best regards
-
NotNull
- Posts: 5961
- Joined: Wed May 24, 2017 9:22 pm
Re: New column displaying a part of filename
Nobody is stopping yousk2107 wrote: Thu Apr 04, 2024 2:48 pm Can I add another column to have the length of the result (len of A column)
Code: Select all
regex:^(.+?)# add-column:A;B A-label:=Category A:=regmatch1: B-label:=Length B:=len($regmatch1:) -
sk2107
- Posts: 385
- Joined: Sun Aug 07, 2022 8:48 pm
Re: New column displaying a part of filename
Perfect. Thanks a lot
Best regards
Best regards