I wouldn’t use hard-coded/fixed indexes. Just think what happens in May rather than November if you use a fixed number of characters from the end. You should trim the string based on content:
mid(description, 0, lastIndexOf(description, ' airs'))
will remove everything starting from (and including) the last " airs" in the string. I’m not exactly sure what the 3x08
at the beginning is (is that a pattern, channel number, fixed string, …?) but you could do something similar to trim the beginning (using indexOf()
rather than lastIndexOf()
). If you replace the 0
in the mid()
function with the correct index based on content you can trim the string using one single mid()
call.
Alternatively you could use replace()
using regular expressions if that is more your thing (it would probably work better for the beginning of the string based on what those things mean and how exactly they are formatted).