All:
I am introducing myself to the expression language with a task - I want to pull the disc number off of the album name.
Say there are 4 albums - Opera Classic Disc 1, Opera Classic Disc 2, etc. I want to look at the Album name and pull disc number off of it. If it has Disc or Vol in the name.
So - I found the regex function, and I am making headway. I ended up defining a library field called Disc Calculator and putting the code in there. But its a pain to keep going to tools - options - manage library fields. Is there a better way to test code?
In the wiki - I found that some of the arguments to the regex function in the examples have options or syntax that I cant find in the wiki. For example (from the wiki):
regex(D03T02 some track.mp3, /#^D(\d+)T(\d+)#/, 1)Disc: [R1], Track: [R2]
The string is matched against the regexp that is looking for a D followed by any number of digits, followed by a T and then more digits. Those digits were captured, and later used to output the value Disc: 03, Track: 02.
I get it that the (\d+) grabs digits, but are there other options - like one digit or two digits? and where would I find the descriptions of those arguments like \d+?
Thanks in advance.