In this article, we discuss finite automata, a state machine that takes a regular expression and changes its state accordingly for each literal and when the transitions reach the final state, the string is accepted and thus it is said to be a valid token of a language.