added regex matching for prefixes