Enhancing the news variable replace logic with dynamic rules