Show HN: The Typing of the RegEX
thetypingoftheregex.com
thetypingoftheregex.com
My most recent examplew was "It's alive! It's alive!" as input with all the non-space underlined, for which I wrote `/\S/g`. It seemed to match all the required parts, but the timer just counted down and ended with a Game Over. And there's no feedback on what exactly was wrong. (I encountered similarly confusing ones seven or eight times, so this isn't an isolated input for which this happens.)
This assumes you already know Python regex. If you'd like learn first, see my free ebook: https://learnbyexample.github.io/py_regular_expressions/
You need to include punctuation for some regexes.
e.g.
The brown fox.
^^^^
Would be matched with: /fox./Try on the match start screen to see the different visual feedback between the two.
Feels like the author thinks regex is a useful way to match a bunch of unrelated words in a paragraph. Not really the point of regex.
But I agree the time is not a good measurement because typing speed is what limits most people.
These are my 2 cents:
- The starting and ending / could be part of the mask, so the user don't need to type it.
- Some rules are not immediately clear. Eg. "The WORLD IS GOOD", should be /WORLD IS GOOD/ or /(WORLD|IS|GOOD)/ ? Or both?
- Add difficult levels. Maybe more time on easy mode.
- It's a nice learning environment. Let the user try to solve the puzzle when the time ends, just don't let him pass to the next level. Or maybe let him pass, but reset the score.
It's too much to ask but I also wish to see recent submissions.
Unless game objective is also to train typing, you are right.
/I'm (sorry|not sorry) for creating this/
I couldn't figure out how to get started until I read someone in the comments suggest to make them optional.
The vi/ed form you often see in HN and other technical discussion memes too, such as:
s/easy/hard
Which is a joke to substitute uses of the word "easy" with "hard". The slashes mark a RegEx so you can get really clever in such jokes, though usually most such jokes are simple word substitutions.
There's a video of it being played here: https://youtu.be/da0GyuwaY_Y
I've also enabled some of my debugging stuff in the console for those who want to dive deeper into expected outputs of certain puzzles.
Getting bonuses means more points and more time added to the clock.
Edit: by the way, the colors in the page are wonderful. The font is pretty nice, too.
time based game over isn't a good idea.
good typer's are advantaged
insteed of that, distribute "try" token