I am studying regular expressions, I have realized that perr[ao]
and perr(a|o)
are equivalent.
Here comes my question (which is surely bullshit), is there no difference in this regard? I mean, for less typing, could you use perr[ao]
? I guess doing this, short as it is, is neither semantic nor good practice.
What is your opinion?
I know that it is different to apply (a|o) to [ao] (for different cases).