I wrote a program which can generate regex like this a(b|)c. Actually, it means (abc)|(ac). But is a(b|)c an acceptable regex for any regex engine? Or is there any other alternative to give the same semantic meaning?
Further question: is there any tool can covert it to a “normal” representation? e.g convert a(b|(c|))d to a(b|(c)?)d
ab?c, orab{0,1}cwould make more sense. Ana, followed by at most oneb, followed by ac.