Given the following regular expressions:
- alice@[a-z]+\\.[a-z]+
- [a-z]+@[a-z]+\\.[a-z]+
- .*
The string alice@myprovider.com
My gut instinct says that not only is this a hard problem, both in terms of computational cost and implementation difficulty, but it may be unsolvable in any realistic fashion. Consider the two following regular expressions to accept the string alice@myprovider.com
alice@[a-z]+\.[a-z]+ [a-z]+@myprovider.com
Which one of these is more specific?