The ? condition should have an else option.
I generally use the ? to check if something exits, if true do this, if not do that.
<discnumber>?(<discnumber>,1)<tracknumber:nn> so if i have multiple discs I get 101, 102, 201,202 etc.. and if is only one or not set I get 101,102, etc
@Bruno this idea would cover "if no discnumber" (just have it as an else clause) but you should start a new idea for equality matching if statements, e.g. "if DISCNUMBER=1"...
Bruno Dupuy commented
something i would like could be : if no disknumber or totaldisknumber=1 (aka only one disk) then do not add Disknumber tag. maybe a TatalDisk number tag?
This aproach will be much more powerful. Right now is not posible to do what is proposed.
Yep. Not sure whether the ? could just consume the following two groups:
<discnumber>?|Disc <discnumber>|No discnumber|
Means if there's a discnumber, use "Disc 1" or whatever, otherwise use "No discnumber".
My concern is this is ambiguous as to whether the group is part of the conditional or not (groups are generic and can be used anywhere in a file org pattern), but it essentially works this way already for the 'true' part of the statement.