Meta Interview Question

Regx implementation