Confluent Interview Question

Regex pattern matching along with java concurrenty