this post was submitted on 31 Jul 2024
741 points (99.3% liked)
Programmer Humor
19594 readers
400 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
It's not just digits. Nobody is expecting it to understand language yet but the parser
is-number
still returnstrue
for"2e3"
or"0x0F"
. It tells you whether the string can be interpreted as a real numeric value.Yeah, hence is-"number". But we were talking about regex are we. A number representation can use digits but it can also not. Much like how you make a number using the word "elf".