Author Topic: Track information: Show Disc# when present, blank if not  (Read 1102 times)

secondsabre

  • Newbie
  • *
  • Posts: 2
Another stupid newbie RegEx question for y'all, sorry if this has been asked before in some way.  I crawled the forums and bit, and couldn't find anything that exactly matched, and I'm a total failure at RegEx, so I figured it was time to just ask for help.

Multi-disc albums!  I have my Track Information panel set to show relevant tags, including a few custom tags that I use (managed to get that figured out, despite some frustration).  I'd like it to show Track# and Disc # on the same line, in a format like: 04/31 (Disc 2/4)

I have a template set up like so: <Track#>/<Album Track Count> $IsNull(<Disc#>,,"(Disc "<Disc#>/<Disc Count>))

This works great when there's a Disc# tag, everything shows up as it should: 04/31 (Disc 2/4)
When there's no Disc# tag though, I get a spare parentheses randomly tacked onto the end:  04/31 )

I've tried playing around with the template/RegEx, but can't seem to find a way to get rid of it that doesn't break everything else. :'( I'm sure it's some kind of syntax problem, or I'm just using the wrong expressions, but it's driving me crazy and I'd really appreciate some help.  Thanks in advance!


secondsabre

  • Newbie
  • *
  • Posts: 2
Try ")") in place of )) at the end of the formula.

Oh my gosh, that was it.  I tried everything except doubling up on both quotes *and* brackets.  I feel like an idiot now, but and idiot with things that are working, so a happy idiot!  Thanks, redwing. You truly are a hero member.

redwing

  • Guest
No, you are not. I also tried various things. Once you know what's wrong, it looks easy to spot. But it always takes trial and error even for a simple formula.