Re:Show HN: RegEx Face Off – Beat your friends with regular ...
by jodrellblank on Saturday December 31, 2016 @11:50AM
(#13291778)
You need to write a regex which matches the ones that say "match" by them and excludes the others.
The column with the tick and cross are whether your regex puts this entry in the correct group or not.
"match" and your regex matches it -> tick. exclude and your regex excludes it -> also tick. Successful test.
"match" and you don't match it, exclude and you do match it -> cross, failing test.
Re:Show HN: RegEx Face Off – Beat your friends with regular ...
by StavrosK on Saturday December 31, 2016 @12:20PM
(#13291953)
It looks like you just need to match anything in the line, not the whole line. Basically, re.search(your_regex, line) should not return None.
The ticks are just bad UX, because "tick" means pass, "x" means fail and blank also means fail. I know which ones I shouldn't match, just give me a tick on ones that match, good or bad, and I'll figure out the rest.
Also, the UI is bad, there's a "match" column with a tick and an x, and you get the tick when you match good regexes and the x when you match bad ones. However, why is the column called "match", then? It should have the tick when a regex matches and the x when it doesn't.
Great idea, very frustrating execution.