Shortest match for equation