RE: Regex 101 Exercise S2 - Verify a string is a hex number

It turns out I made a little mistake. The regex should be more like ^[A-Fa-f0-9]+$. The “0” problem might be sorted like this ^[A-Fa-f1-9][A-Fa-f0-9]*$.

Picture of me smiling.

Paul Kinlan

Trying to make the web and developers better.

RSS Github Medium