Skip to content

Comment on Regex Blaster

Comments

I don't understand the first "combat" level. There's no real defining pattern separating the good from bad hex strings, so it's just a typing speed contest to type all the enemy patterns, right? What am I missing?

As far as I can tell, the first combat level enemies all start with "ALERT-" and have exactly 3 digits.

sorry, second combat level. It's all 6 digit hex color strings, some good some bad.

Ah, I see. Yeah, that one definitely took me multiple attempts to see what it wanted.

I believe that the "enemies":

1. Must start with "#"

2. Must be exactly 6 hex digits

3. Must be lowercase

Ohhhhh I swore there were friendlies with lowercase too! Thank you!!

There are, just not lowercase characters that are valid hex.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.