Pregunta de entrevista de monday.com

Regex in Swift - full implementation