Using $regexp(...) can be cumbersome at times, when one want to only check if a variable matches some regex pattern and use it as a boolean test. Current situation requires user to either:
- Use hard-to-manage scripting along the line of
$if($strcmp(%var%,$regexp(%var%,'...',...(can be more annoying if additional boolean test needs to be combined) - Split into several actions: First use
$regexp()to generate replaced string into temporary variable, then compare it with original variable, and finally remove temporary one.
So I want to suggest a new function to simplify regex tests, with spec like one of below (up to Florian to decide which is better):
-
$ifmatch(string, pattern, if-true, if-false)-- working like$ifgreaterand$iflonger -
$regmatch(string, pattern)-- only produce boolean result, like$strcmpand friends
Personally I want both
, first form as a simple shortcut, and 2nd form for combining multiple boolean tests.
Please pardon me if similar feature already exists -- I haven't been following mp3tag development closely. 
