You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there, I've just noticed that when (a+b)(b+$)*(b+$)+a+b
is fed into the Regular Expressions Gym, it simplifies to (a+b)b*(b+$)
However I'm pretty sure the fully simplified regular expression should be (a+b)b*
Since if you expand the (a+b)b* onto (b+$) you get (a+b)b*b+(a+b)b* which can be simplified to (a+b)b*?
The text was updated successfully, but these errors were encountered:
Thanks for the report, @dylanmorroll! Yeah, I agree that the regex in question could be simplified more.
There's a specific simplification rule just for that case, and it seems it kicks in as expected when you try to simplify this:
b*(b+$)
but it doesn't kick in when you try to simplify this:
(a+b)b*(b+$)
And it should kick in just the same. Not sure why it's not, though. I probably won't have time to investigate in the near future, so if someone else wants to dig in and open a pull request to fix this -- I'd be happy to review and merge! 👍
Hi there, I've just noticed that when
(a+b)(b+$)*(b+$)+a+b
is fed into the Regular Expressions Gym, it simplifies to
(a+b)b*(b+$)
However I'm pretty sure the fully simplified regular expression should be
(a+b)b*
Since if you expand the
(a+b)b*
onto(b+$)
you get(a+b)b*b+(a+b)b*
which can be simplified to(a+b)b*
?The text was updated successfully, but these errors were encountered: