Datadog Interview Question

String pattern matching based easy qn