by sundarurfriend · 4y ago · 0 comments
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.)
You need to include punctuation for some regexes.
e.g.
The brown fox.
^^^^
Would be matched with: /fox./This assumes you already know Python regex. If you'd like learn first, see my free ebook: https://learnbyexample.github.io/py_regular_expressions/
Try on the match start screen to see the different visual feedback between the two.