Electric Era interview question

How to handle an input text and analyze the data.