Don't do it that way (all in one step). Make two Tag on Import rules:
Field: Series
Value: If(IsEqual([Name],Simpsons,8),The Simpsons,[Series])That'll set the series if it finds "Simpsons" anywhere in the current [Name] field.
Make sure that one comes first in your list of Tag on Import rules (they're processed in-order). Then, since the [Series] is already filled, you don't need to "keep" the text at the beginning of the [Name] field and send it anywhere, you just need to remove it. So, make another one to do that:
Field: Name
Value: If(IsEqual([Series],Simpsons,8), ListItem([Name], 1,/ -/ ),[Name])ListItem() will let you use any string of text as a List, and specify what delimiter to use, and then lets you pick out the particular item you want. So, that ListItem() function above "splits" the input string up at " - " into a list of items, and then spits out item I want. Item 1 corresponds to the
second item in the list in this case because the list's index is zero-based (it starts at 0, then 1, then 2, and so on). The forward slashes in the delimiter argument are escape characters. They make the expression engine not ignore the whitespace around the dash, so that it is testing against " - " and not just "-" (which would catch hyphenated words in the episode title).
If your EPG is really not consistent about whether it prefixes it with a colon or a dash, but if the prefix is always the same length, it might be easier to just do:
Field: Name
Value: If(IsEqual([Series],Simpsons,8), RemoveLeft([Name],15),[Name])If you need to, you could get really fancy with the ListItem() expression call, and do a thing where you use
FirstNotEmpty() to detect what delimiter was used. I didn't test it, but I
think this would work (barring a misplaced comma or parenthesis):
Field: Name
Value: If(IsEqual([Series],Simpsons,8), FirstNotEmpty(ListItem([Name], 1,/ -/ ),ListItem([Name], 1,/ :/ ),[Name]),[Name])Each item that FirstNotEmpty() tests would be empty if the delimiter isn't found at all, since you're extracting the
second value from the string (if it doesn't find the delimiter, FirstNotEmpty() dumps everything out as index 0). Then, if neither of them match, it just gives up and dumps out [Name]. If you need to add additional possible delimiters to look for, you can just add more ListItem() elements to the pattern above, and keep [Name] as the last fallback.
If you had to do it on the first value, you'd have to do more wizardry and test for the existence of the delimiter substring first, but even that could be done I think. FirstNotEmpty() is super-cool.