I was reading up about formal languages (see here: https://pdfs.semanticscholar.org/18b2/d685d5e244a6bfc5a31d312f1e8d322c16a9.pdf) and got confused when I started reading about this expression: 0(0+1)∗+(0+1)∗0
This is how I think it works:
The first and last 0 indicates where these two characters must be present. In other words, the string this expression describes must start and end with one 0. (0+1)* describes any combination of 0's and 1's (including none at all), and the plus in between each of these sets of brackets ((0+1)* +(0+1) *) describes a concatenation of these two strings. Therefore, this expression applies to any binary string that begins and ends with a 0.
If this is indeed how the expression works, wouldn't 0(0+1)*0 achieve the same thing?
(Also, is there a site I can check these sorts of expressions? I tried this expression in sites like regex101.com but it didn't work on any of them. This isn't important, I was just curious)