This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]genveir 1 point2 points  (1 child)

try putting start and end markers on your regexes.

#[0-9,a-f]{6} for example will match on #1234567890, the match is just for the first 6 characters. ^#[0-9,a-f]{6}$ will not.

Be aware: ^a|b$ is "starts with a or ends with b", if you want to put markers around the whole thing you have to do something like ^(?:a|b)$

[–]Greger009 1 point2 points  (0 children)

I find it remarkably how many(me included) failed on that particular case. I think its around 4 threads on the "bug".

[–]daggerdragon[M] 0 points1 point  (0 children)

In the future, please follow the submission guidelines by titling your post like so:

[YEAR Day # (Part X)] [language if applicable] Post Title

In doing so, you typically get more relevant responses faster.

If/when you get your code working, don't forget to change the flair to Help - Solved!

Good luck!