Custom columns from filename

As explained aòready here https://resource.dopus.com/t/metadata-and-columns/26763/6,metadata are slow for grouping and sorting so i need some custum column based on the filename
Wowbagger already helped me to understand a bit so we made a column that extract the firs part of the file. I tried to read something about Regular expression but unfortunately i didn't undersand almnost anything.

So i'm here hooping someone can do these columns for me

The format of the file is: Artist (Genre) - Title (Year)
Example: One Piece (Cartoni) - E154 L'Isola nel cielo (2011)

I need those 4 columns to show "One Piece" "Cartoni" "E154 L'Isola nel cielo" "2011"

RegExp uses Capture Groups, in the output they become $1 $2....
We can use the same RegExp for each column, have use a different capture group in the output for the columns.

Regexp ^(.*)\s\((.*)\)\s-\s(.*)\s\((\d{4})\)$
Artist $1
Genre $2
Title $3
Year $4

This is almost GREAT!
The columns are ok but i have a problem. When i don't have all informations (mostly the Year but it can be everything) the columns show the entire filename

Desidered behavior. if a file doesn't have all the info ( "One Piece (Cartoni) - E154 L’Isola nel cielo" ) the other columns should show only what they show normally and the one without info should be empty

^(.*)\s\((.*)\)\s-\s(.*?)\s?\(?(\d{4})?\)?$

Works only if it's they Year that is missing

You can see that the ones without "(Fantasy)" have problems. I don't relly need to specify Genre for Cartoons or Tv Series

^(.*?[^\(])(?:\s\((.*)\))?\s-\s(.*?)\s?(?:\((\d{4})\))?$

I suggest you try learning RegExp, there are lots of good resources out there. Getting it exactly right takes trial and error, I can only go off what you request. Tools like expresso make it pretty easy.

http://www.regular-expressions.info/reference.html

I tried but it's too complicated. Maybe if it was in italian i could understand but i'm not sure
i downloaded that expresso you said but i don't know what to do
I mean i thought i could enter text and get the code but it's not how it works

Hi i have a different problem with these colums. The columns don't show contents after a research

Here is before a research. I will search for files with labels=Configurazioni

Here i have found the 2 results but as you can see the columns Artista and Titolo are empty

Strange is that if i go back and then forward again to the search results. the columns show what they have to show
So Directly from research=empty but browsing=OK