News for hackers. Stuff that matters.
Re:Show HN: 15-question programming quiz with answers by StavrosK on Tuesday May 23, 2017 @01:37PM (#14403246)
Yep, I just came here to post that:

In [2]: re.search("b[l].e", "babel")

In [3]: re.search("b[l].e", "blabber") Out[3]: <_sre.SRE_Match at 0x7f2db79ed030>

It looks like they meant "match" as in "re.match", i.e. "^b[l].*e$", which is not the usual definition of the word.

Re:Show HN: 15-question programming quiz with answers by ibdknox on Tuesday May 23, 2017 @01:38PM (#14403271)
That would also make this question specific to python, which wasn't at all what I was thinking about. It's a question about regular expressions, it should be as agnostic as possible to implementation.
Re:Show HN: 15-question programming quiz with answers by StavrosK on Tuesday May 23, 2017 @02:04PM (#14403575)
Yeah, agreed, although there are different RE flavors, so you can't get too agnostic.