How do I escape a single quote in regexp? These attempts don't work:
$regexp(%title%, '[_#\']',)
$regexp(%title%, '[_#'']',)
How do I escape a single quote in regexp? These attempts don't work:
$regexp(%title%, '[_#\']',)
$regexp(%title%, '[_#'']',)
In this case it would probably be
`$regexp(%title%, '[_#''']',)
It is 2 apostrophes to escape one and then you have 2 strings in apostrophes, one to the left and one to the right of the escaped character.
I copied and pasted that into the column value:
$regexp(%title%, '[_#''']',)
The column shows this:
[ SYNTAX ERROR IN FORMATTING STRING ]
Try this:
$regexp(%title%,'['_#''']',)
That works! Thanks! Can you explain how/why that works?
See "Characters with special functionality" here: Scripting Functions – Mp3tag Documentation
'['_#''']'
[_#']'[_#''']'
[_#'], followed by an unmatched apostrophe'[_#'']'
[_#]