Replacing a Portion of Title with the Discnumber Value

I am attempting to use a regular expression action to delete a portion of the title field and replace it with the numerical value from the discnumber tag. I presumed that I could use %discnumber% in the replace with field. However, that only results in the deleted text being replaced with "%discnumber%" not the value from the Discnumber tag. What would be the correct vocabulary to accomplish this?

Thank you.

Is the part of the title to be replaced variable or is it always the same text?
It's best to give an examples of the actual situation so that you can get an idea.

Please show us the expression that you have used so far.
And also, a screenshot of the extended tags dialogue Alt-T of one of the files would be nice.

The Regular Expression Action I am using is:
Field: TITLE
Regular Expression: \s*\([^\)]+?\)\s*
Replace Matches With: %Discnumber%

The portion of title to be deleted and replaces is variable, but is always in paranthesis. That portion of the action is working perfectly. THe problem is the "Replace Matches With". I am trying to replace with the value from the Discnumber field not with the character string %Discnumber%.

Try Convert>tag-Tag as that has a preview to test your expression:
Format string: $regexp(%title%,\(.*\) (.*),%discnumber% $1)

Works like a charm. Thank you!!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.