Hacker News new | past | comments | ask | show | jobs | submit login

I made this because RegEx can be really useful but is pretty dry to learn. The format was also pretty convenient for someone not that experienced at making web games, it's all just form submits with code that actually just evaluates the RegEx so I don't have to worry about every possible variation.

I probably spent the most time on the CSS, because making things easy to use on different sizes of screen was definitely the biggest factor. Ended up being a good opportunity for me to brush up on a few things to be honest!

I also enjoyed the challenge of adding line breaks or highlighting text while having a typewriter effect. Because I was adding a character at a time I couldn't include HTML markup so I ended up using my own symbology and interpreting that on insert. For example, text I wanted highlighted I enclosed in 'quotes' and followed immediately with $. Whenever the typewriter function sees a $ sign, it runs a RegEx replace on the most recent 'quoted' string to add in highlighting spans.




If you write something wrong on the first question, you are asked to make a pattern that matches “anything” - such a pattern would be the 8 letters “anything” literally.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: