Hi All,
I have a number of tags where %ALBUM% is 'Name Of Album' with the inverted commas around it (this is due to a 'tag from filename' error, which was completely my fault.)
I know it's easy enough to re-do the extract tag from filename and just use:
%ARTIST% - %TITLE% - '%ALBUM%' - %TRACK%
which will ignore the inverted commas when creating the %ALBUM% tag, but I wondered if there was a more elegant way using regex?
What I'd love to do is set up an ACTION where I can remove inverted commas from either side of a string, but ONLY if they exist on both sides (ie a conditional expression). So:
'AROUND THE CORNER' becomes AROUND THE CORNER, but
'ROUND THE CORNER remains unchanged, as it's a deliberate inverted comma.
And, presumably, ''ROUND THE CORNER' will change to 'ROUND THE CORNER, stripping the first and last characters but leaving the second in place.
And, for good measure, would it be possible to adapt this to remove ANY CHARACTER from either side of a string, perhaps by allowing a user variable (I'm not sure if this level of interaction is possible in regex!). So we would have the option to edit tags such as:
(I DON'T LIKE BRACKETS)
OR UNDERSCORES
[OR SQUARE BRACKETS]
{OR SQUIGGLY ONES}
"OR QUOTE MARKS"
Quite an ask, I grant you, but there must be someone out there who could do this with his or her eyes shut.
Possibly this is a challenge to the poster 'pone', who seems to like elegant solutions!
Thanks
Miles.
REASON FOR EDIT: Changed 'with his eyes shut' to 'with his or her eyes shut'. Ooops!