[HN Gopher] Show HN: The Typing of the RegEX
___________________________________________________________________
Show HN: The Typing of the RegEX
I'm sorry/not sorry for creating this.
Author : workeffortwaste
Score : 50 points
Date : 2022-10-26 13:03 UTC (9 hours ago)
(HTM) web link (thetypingoftheregex.com)
(TXT) w3m dump (thetypingoftheregex.com)
| personalityson wrote:
| They should state very clearly what RexEx version/engine
| pcthrowaway wrote:
| It's likely using your browser's javascript regex engine
| igor47 wrote:
| what are exclusion puzzles? the underline changes to be an
| outline, but i'm really not sure what to do. some help on the
| game would be helpful!
| workeffortwaste wrote:
| Every word but the marked words, you can see an example of one
| being solved in this video.
|
| https://youtu.be/da0GyuwaY_Y
| Cieric wrote:
| Note for anyone who might have missed it like I did. Dark Reader
| makes the underlines not visible. Didn't know what I was doing at
| all until I disabled it.
| uses wrote:
| How am I supposed to match two entirely different words? Atomic
| groups with | don't seem to work. Not something I'd use regex for
| anyway. What am I missing here?
| workeffortwaste wrote:
| /wordone|wordtwo/g
|
| There's a video of it being played here:
| https://youtu.be/da0GyuwaY_Y
| johnmorrison wrote:
| Loved this! Super fun, but the timer feels a bit fast sometimes
| and as far as I can tell the game will randomly give you anywhere
| from a very easy or quite difficult level at any point, so there
| doesn't feel to be a natural progression in difficulty as you
| start a new game and finish each level.
| ykonstant wrote:
| You are pure, unadulterated eeeeeevil. Also, I am surprised at
| how many people are not getting the point of the game.
|
| Edit: by the way, the colors in the page are wonderful. The font
| is pretty nice, too.
| LordDragonfang wrote:
| Perhaps enlighten us rubes with the "point"?
| cphoover wrote:
| needs more clear instructions... Am I using capture groups? what
| is the goal?
| moritzwarhier wrote:
| Great visuals and sounds. I didn't understand the reference
| without the fellow HN commenter explaining it. Maybe you could
| focus the input box on startup and after Game over.
| orliesaurus wrote:
| so frustrating you're not revealed the answer when you lose
| Apreche wrote:
| This would be a lot better if it didn't make me start and end
| every entry with / Also, the timer is way too short for anything
| more than a word or two. The third one is a whole bunch of words.
| That's too much.
| llagerlof wrote:
| > Also, the timer is way too short for anything more than a
| word or two. The third one is a whole bunch of words. That's
| too much.
|
| Unless game objective is also to train typing, you are right.
| rashkov wrote:
| I think that may be part of the inspiration, given the
| reference to "the typing of the dead" typing game
| llagerlof wrote:
| I liked it. Thank you.
|
| 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.
| mcluck wrote:
| I had fun with this but I _really_ wanted a learning mode. I
| was more interested in solving the puzzle of the regex than
| maxing out my score. Maybe make a version where you can get
| maximum points for a period of time then the possible points
| starts to go down. You can still continue after it hits 0, you
| just won't get any points
| xnx wrote:
| I think you need the trailing slash so you can add the global
| flag?
| llagerlof wrote:
| You are right! I thought the game doesn't support flags.
| Maybe just the starting / could be part of the mask.
| rvalue wrote:
| have a untimed version too. also, typing // all the time is
| annoying, make it by default
| workeffortwaste wrote:
| Video of it being played:
|
| https://youtu.be/da0GyuwaY_Y
| mistersys wrote:
| Fun idea, but pretty unfun to play. Half the questions are just
| five, six different words you need to `|` together, and not
| enough time to even type out that many words.
|
| 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.
| luuuzeta wrote:
| I tried it on my phone and it looks like it could be fun. However
| the timer is too fast.
| SamLeBarbare wrote:
| hurry up!
|
| time based game over isn't a good idea.
|
| good typer's are advantaged
|
| insteed of that, distribute "try" token
| 1-more wrote:
| Is this a bug? Matching both instance of "us!" in "One of us! One
| of us!" didn't work with either /us!/g or /\bus!/g. That said
| this rocks and I love it tysm.
| JulianChastain wrote:
| Is there any way to see what the expected regex was after
| failure? I feel like this could be a great review tool if that
| was added
| whoibrar wrote:
| Yes. One or two potential answers could be really helpful
| features.
|
| It's too much to ask but I also wish to see recent submissions.
| sundarurfriend wrote:
| Could do with a bit more instruction and feedback to the user. A
| lot of the times, the blue highlighting seems to indicate I've
| matched all the necessary parts of the input, which _should_ mean
| the puzzle is solved, but it 's Game Over instead.
|
| 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.)
| demindiro wrote:
| > A lot of the times, the blue highlighting seems to indicate
| I've matched all the necessary parts of the input, which should
| mean the puzzle is solved, but it's Game Over instead.
|
| You need to include punctuation for some regexes.
|
| e.g. The brown fox. ^^^^
|
| Would be matched with: /fox./
| anamexis wrote:
| You have to be careful about escaping, in case you do not
| watch to match "foxy" as well.
| asicsp wrote:
| If you are interested in Python regex, here's my tkinter app
| with 75 interactive exercises:
| https://github.com/learnbyexample/py_regular_expressions/tre...
|
| This assumes you already know Python regex. If you'd like learn
| first, see my free ebook:
| https://learnbyexample.github.io/py_regular_expressions/
| satisfice wrote:
| You should have written:
|
| /I'm (sorry|not sorry) for creating this/
| yshavit wrote:
| /I'm (not )?sorry for creating this/
| tambourine_man wrote:
| Design-wise this is amazing. Typography, animations, just great
| taste all in all.
| Sateeshm wrote:
| This is great. I would love it if it actually taught Regex for
| users that want to learn!
| wodenokoto wrote:
| what are the / for?
|
| I couldn't figure out how to get started until I read someone in
| the comments suggest to make them optional.
| WorldMaker wrote:
| It's a traditional Regex syntax in several languages including
| JS (relevant here), Perl, and going way back to ancient Unix
| tools such as vi and ed.
|
| 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.
| [deleted]
| maxfurman wrote:
| This is fun! Except I was almost immediately stymied by a
| question that asked me to match both "like" and "live". I put in
| `/li[kv]e/`, which was not accepted, but passes in every regex
| engine on regex101. I'm a bit confused. Is this a bug in the game
| or did I miss something in the question?
| viggity wrote:
| add a "g" after the last slash to make it a global search. (I
| didn't make the game, I'm figuring shit out too. All the same,
| I'm a regex ninja and the time allotted is far too low.
| Natsu wrote:
| It doesn't seem to like regexes like /.*/ either, despite them
| matching the whole thing.
| [deleted]
| siraben wrote:
| Got 8250. At some point it just becomes a matter of "how many
| words can you type separated by |", IMO. The design is very
| aesthetically pleasing, too.
| ksherlock wrote:
| On older safaris, the background skewed svg doesn't display
| correctly (which would be a safari problem but there are plenty
| of ways to underline text without being too clever by half) so
| it's not clear what should be matched, particularly when it
| involves trailing punctuation.
| juancn wrote:
| What syntax does it use? For example `|` doesn't seem to do
| anything.
| juancn wrote:
| Got it, it looks like sed-ish syntax. In the end it's a typing
| speed test.
___________________________________________________________________
(page generated 2022-10-26 23:01 UTC)