I'm studying computer science and learning about regexps and we have discussed FSM and regular expressions. I have also learned in my hardware class that you can use logical operators not and or to define a large variety of logical and mathematical operations (such as and, nand, xor, adders, etc.) Since many dialects of regex have logical not and logical or, what is the drawback or other problem with using something like:
(taken from a recent homework assignment, design a FSA that accepts only a and b but never in pairs.)
^((^aa*)|(^bb*))*
I know there are better regexps for this example, such as (ab)*|(ba)*
, but I'm curious about the theory here.