How about defining the condition as either "nothing+tag+something" or "something+tag+nothing"? If it's possible, it'd filter out inside tags while allowing either prefixes or suffixes. (OR could allow both too if there is interest, while XOR wouldn't. Maybe XOR is better if people use tag prefixes and rank suffixes which resemble other tag prefixes.)