RTC:change to regex and optimize unit test