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 1+$. The “0” problem might be sorted like this ^[A-Fa-f1-9][A-Fa-f0-9]*$.



  1. A-Fa-f0-9 [return]

Paul Kinlan

Trying to make the web and developers better.

RSS Github Medium