One thing you should know that when comparing regex it's very tricky to deduce that the regex are equal or not unless they are reduced using identity so I recommend you to not fall prey to the bait but instead make an automata for each of the regex and then compare you will be able to compare regex quite remarkably