Hello there, I have a regular expression to detect the discnumber and convert to single digit. It's always been fine but now it's not changing my example.
I just want it to show as 1, 2 or any relevant number that the disc is.
Hello there, I have a regular expression to detect the discnumber and convert to single digit. It's always been fine but now it's not changing my example.
I just want it to show as 1, 2 or any relevant number that the disc is.
If your DISCNUMBER looks like
1 / 2
you have to adjust your regular expression to include the space before and after the / slash
Is there an action I can use that will deal with both instances in the same way? Perhaps conditional?
You can try it with
(\d+).*/.*\d+
Explanation:
"Any character" can also be "no character".
Therefore it matches the number 1 from
1/2
as well as in
1 / 2
Please be aware that you can not undo this step.
The information about how many discs your current album has (2 in the above example) is gone after appying this regular expression. It only remains the discnumber itself.
Thank you, that works perfectly and the explanation was really good too. I'm pleased to be left with only one digit in the DISCNUMBER.
The same could have been achieved with an action of the type "Format value" for DISCNUMBER
Format string: $num(%discnumber%,1)
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.