Using $mid(a,b,c)

Am trying to simplify my workflow and have seen something that may be of assistance in that respect. I noted in an early post from 2011 (/t/11096/14 Pone has used $mid function in a script..which even with what seemed to be the oversimplified explanation, I am still having difficulty using. Trying to use it to pull from certain words on to the end of the string..

Attempting to pull from these key words to the end of the tag %album%...

This is what I attempted to do but produced no result

Guess Values
Source: $mid(%album%, (Hands|Festival|Sampler|Compilation|Volume|Session|Part),99)
Guessing Pattern: %compilation type% %number%

Am able to pull my desired results other ways and but this would be simpler to be able to put it into one action than one for each type which is what I have now....

Any assistance would be appreciated.

The post you quoted (Move "Featuring" from Artist to Title) seems not match with this topic resp. what you want to achieve.

I understand your question this way: ...

  1. Extract the right part of a string, starting at the left edge of a keyword until end of string.
  2. Divide the extracted string into two parts and store each part into a different tagfield.

Proposal for step 1:
from: 'abc def Sampler 2017'
to: 'Sampler - 2017'
Formatstring: $regexp(%album%,'^.+?(Hands|Festival|Sampler|Compilation|Volume|Session|Part)\s(.+?)$','$1 - $2')

Proposal for step 2:
Apply an action "Guess values" to fill the tagfields "compilation type" and "number".

If you do not want to apply the action "Guess values", then you may solve the task by two actions "Format value".

Proposal for step 1 (action "Format value") (get compilation type):
COMPILATION_TYPE <== $regexp(%album%,'^.+?(Hands|Festival|Sampler|Compilation|Volume|Session|Part)\s(.+?)$','$1')

Proposal for step 2 (action "Format value") (get number):
NUMBER <== $regexp(%album%,'^.+?(Hands|Festival|Sampler|Compilation|Volume|Session|Part)\s(.+?)$','$2')


That is just what I was trying to do...many thanks.

I wish that I had thought of this way sooner as it would have saved me quite a few struggles with calculations and testing this is much simpler and I now no longer need one action for each of these...