Add RegexHelper to remove duplicated code