Replace [brackets] with (parentheses) if they contain certain words?

Basically, I want to achieve the opposite of this thread.

Here's the formula from that thread:

$regexp(%TITLE%,'\(([^(]*\b(?:remix|live|mix|edit)\b[^)]*)\)','[$1]',1)

This does the inverse of what I'm trying to accomplish. I want any brackets containing certain words to be changed to parentheses, so this:

Title: Song Name [Live]

would become this:

Title: Song Name (Live)

Any help is appreciated!

Or do you want to replace any square brackets with round brackets?
Is the list in the expression that you found complete? Or are there other words as well that should trigger the replacement?
Or do you have square brackets and all of them should be replaced?

If the latter is the case then I would try an action group with 2 actions of the type "Replace" for TITLE
One to replace [ with (
and the other to replace ] with ).
which may be easier to understand.
Or use
$regexp(%TITLE%,'\[([^(]*\b(?:remix|live|mix|edit)\b[^)]*)\]','($1)',1)

This is exactly what I needed. I had tried to modify the original formula I posted with no success, but now I see what you did and it works perfectly. Thank you!!

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