Added a function to identify the alphabet from the inputed regex