I would like to create an action that cleans up the track number field in the following way:
If track number contains number of total tracks (placed after a slash) then move (i.e. copy then delete source) just the digits after the slash to TOTALTRACKS and delete the slash symbol from the track number.
Then strip any leading zeros from both the TRACK and TOTALTRACKS fields.
I've done some digging around and found actions to strip leading zeros from track numbers (which is straightforward enough). I've also seen a way to extract the total tracks portion of the track number from the end of a string, although the method I saw did seem a bit clunky because it just counted characters from the right without taking into account what those characters were or how many characters make up the full string. This seems more likely to have unintended consequences.
I was hoping someone could provide me with a more elegant and succinct way to achieve the above.