I'm studying regular expressions, I've noticed that perr[ao]
and perr(a|o)
are equivalent.
Here comes my doubt (which surely is a bullshit), is there no difference in this regard? That is, by writing less, could I use perr[ao]
?
I suppose that doing this, however short, is neither semantic nor good practice.
What do you think?
I already know that it is different to apply (a | o) to [ao] (for different cases).