Replacement String not working

Hi All, Hope one of you wizards can point out what I'm doing wrong please. I've been using MP3Tag for a while but cannot fathom out why I'm stuck on this issue.
I'm trying to replace the contents between square brackets and not making any progress.
Here's an example that works exactly as I expect:-
This one replaces four numerals and text inside parenthesis with just new text also inside parenthesis;
Regular Expression ((.... Some Text)) Replace Matches With (New Text)

I want the same outcome where there are square brackets instead of parenthesis eg:
Regular Expression ([.... Some Text]) Replace Matches with [New Text]

I've tried putting apostrophes around the brackets as follows;
('['.... Some Text']') and also ('[.... Some Text]') but neither works and leaves the original string unchanged.

Incidentally, If I use the replace command for "TITLE": "[TEXT]" -> "" then it successfully deletes the brackets and the content.
Am I missing something obvious?

The escape character is \.
So it would be \[ if you want to use the [ in the literal sense.

And then it would be much easier for debugging if you could supply the real expression and not just an example that you feel shows the expression.

If you really want to narrow down the 4 characters to numbers, then try \d+ or even \d\d\d\d
Further reading, see the documentation:

Thank you...
Real expression is [1982 Remaster] and I want [Rem]
As previous if (1982 Remaster) accurately becomes (Rem) why doesn't it apply the same logic to the square brackets phrase but leaves it intact instead?
Will try [1982 Remaster] as you suggest.

The round brackets also have a special purpose ...
So it could be:
Search string: \[\d+ .*
Replace string: '['Rem']'

For (1982 Remaster) it would be:
Search string: \(\d+ .*
Replace string: (Rem)

Brilliant, thank you. Spent ages on this and you seem to have done it in 5 minutes. also your round brackets suggestion is much neater too.
Many thanks.

I suggest testing regular expressions on sites like this one before trying them out in mp3-tag. You should quickly get the hang of it and personally I think it's fun and extremely versatile.

Thanks - I'll give that a go. Might help clarify some of the parameters and contexts involved.

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