beta-tester maybe it would be an option to merge all different fields to one long single string
I like the string concatenation idea, but I think that it could be enhanced by adding field markers before each of the EPG fields (even empty ones) to be concatenated. This will allow matching between markers if required. This means that a single regex can test multiple fields individually.
The actual field markers can be worked out later. They need to be not normally found in EPG text, but easily typed on most keyboards. Not be part of regex syntax (therefore requiring escaping) as well as being consistent with the parameters for TVH pre/post processing scripts ($t for title, etc). For now, I'm just using numerals to illustrate the point.
Consider the following concatenated EPG string:
1sophie2catastrophic3scatter4catapult56
(1 represents the title, 2 the sub-title and so on.)
.*cat.* will match anywhere.
(?<=2).*oph.*(?=3) will match catastrophic in the sub-title, but not sophie in the title.
(?<=2).*cat.*(?=6) will match cat anywhere apart from the title.
(?<=1).*oph.*(?=2).*(?<=2).*cat.*(?=6) will match, whereas (?<=1).*jen.*(?=2).*(?<=2).*cat.*(?=6) will not, even though cat is present.
My regex skills are not the sharpest, so perhaps there is a more elegant way to do this, however, I believe that the concept is worth further consideration.
davep I suspect the "bycatch" would be much greater (and harder to understand) in that case.
This scheme could eliminate, or at least reduce, "bycatch".