simplify the regex for dynamic content validation