Author Topic: $RxReplace in "Infer and Overwrite Tags from the Filename" gives "no changes"  (Read 1283 times)

laundmo

  • Newbie
  • *
  • Posts: 2
hey there,

im trying to use a RxReplace in the "Infer and Overwrite Tags from the Filename" filename template, but no matter the regex i enter, i always get "no changes", when i don't use a regex tho, i get changes.

did i miss something about not being able to use that there? am i doing something else wrong?

heres my template:
Code
$RxReplace(<Album>,".*\([0-9]{4}\).(.*)","$1")\<Title>

and heres the regex is a online tester: https://regex101.com/r/7UfbBA/1 to verify its works

any help appreciated!

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34362
only writeable fields can be updated - any forumula's or virtual tags wont work

laundmo

  • Newbie
  • *
  • Posts: 2
only writeable fields can be updated - any forumula's or virtual tags wont work

i don't quite understand what you meant by that, what qualifies as a writeable field and what do you mean by formulas?

Zak

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 2459
I don't think a Regular Expression is going to work to update tags based on filename.
The expression might return a value, but MusicBee won't know which tag it should be assigned to.

In your formula it's clear that the Title should be set to the filename part.
But there's no way to specify where the result of the expression should be used - if it works at all it will just get evaluated and then discarded.

Can you just use this as your template?
Code
(<Year>) <Album>\<Title>
Bee excellent to each other...