Delinea Interview Question

coding question: string pattern matching