A nice example of this is matching for TV Shows with a naming similar to
Show.S##E##.mkv
You can create a rule with the predicate
Original Filename matches ('my_show'.+)[sS]('my_season'[0-9]+)[eE]('my_episode'[0-9]+)
Now if a filename matches the shown Regular Expression the part identified as show, season and episode will be captured in the named captured groups denoted by ('name'). The syntax of these named captured groups deviates slightly from the ICU standard.
In the action part of the rule you can now add a custom tag to use the captures. For this example you just create an action saying
Set Show to {my_show}
The {my_show} is converted to a tag that automatically uses the capture group named my_show.
Note: Regular Expressions is a very advanced topic and this article is not intended to teach you about Regular Expressions, but to give you and ideas how you can use them in rules. If you run into any problems, please contact support directly.
0 Comments