Datadog interview question

Make a function which matches a simple regexp