Wooho, I managed to write a proper regexp! The test suit should be green now! :D \o/
Although the new regexp makes all the tests pass, it doesn't cover the case, which was previously covered by the original regexp. This test proves the statement. If you run the test suit with the old regexp, it should still contain only one, the same old, failure: "Convert string with the number 1 in it". However this test will pass. On the contrary, the new regexp can't please this test.
The author of this regexp is actually @sergeypererva. Kudos, man! The problem with the original regexp is that it uses something that a regexp shouldn't normally contain: [^\1] is not a valid thing. More information: http://www.regular-expressions.info/backref.html (See section "Parentheses and Backreferences Cannot Be Used Inside Character Classes")
We've been trying with @sergeypererva to figure out what strings match against the regexp and discovered that the "?" can safely be removed.
The project is now known as Cask. https://github.com/cask/cask
…`looking-at` apparently looks over linebreaks. Thanks @daniel-pittman for reporting.
I found steps like: And I go to point "3" too 'robotic'. I don't think that as a Emacs user I ever think in points of a buffer. So I've added steps which are more natural to me.