BBD interview question

A simple string manipulation question, focusing on validating a number given to you based on patterns provided.