Implement empty alternatives. Example: (abc|)
Fix issue with anchors ^ and $ in regular expressions handled incorrectly