|
I'm with you - I use regex a lot if I can...
"If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization." ― Gerald Weinberg
|
|
|
|
|
Is indeed astounding about the brain which first conceived the regex. And the first coder who implemented it.
Ordinary users like me make mistakes in formulating regular expressions; just imagine how rock solid must be the code which does the parsing.
|
|
|
|
|
Parsing it is a lot easier than it seems. The thing about a regular language is it's very ... regular. The code is predictable to write, which makes things much smoother.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
|
I find their railway diagram to be much harder to follow than my state diagram.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
Ha! That's proof positive that you didn't play enough with model trains when you were little.
Mircea
|
|
|
|
|
I hate regexp.
Mostly because I only have a need for it once every decade and I forget about it.
CI/CD = Continuous Impediment/Continuous Despair
|
|
|
|
|
I like your Visual FA project.
You don't want to allow -0.xxx ?
|
|
|
|
|
That regex is in error, and I've since updated it, but not the post.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
I only hate it because I can't understand it. I have yet to find the tutorial that explains it in a way I can understand it.
There are no solutions, only trade-offs. - Thomas Sowell
A day can really slip by when you're deliberately avoiding what you're supposed to do. - Calvin (Bill Watterson, Calvin & Hobbes)
|
|
|
|
|
I think I would have probably created the state machine from scratch instead of trying to describe the valid input with that regex!
FormerBIOSGuy
|
|
|
|
|
It's nothing to do with love or hate. I recognise regular expressions' utility, but simply don't use (or need) them often enough to be comfortable with them.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
You wouldn't be one of the haters I was referring to then.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
(not read all replies so it might been discussed already)
How about being able to parse leading zero's?
They do not occur often, but these are valid ascii representations of numbers.
E.g. -000123.456 or 0000042 may not be efficient but very well parsable.
Supporting leading zeros would add two edges to your dfa.
|
|
|
|
|
Not valid JSON, IIRC.
Though my regex has since been updated. The one in the original post was not compliant.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
|
rob tillaart wrote: integers starting with a 0 are considered OCTAL in many programming languages (except zero itself). Why would that be an exception? What would happen if 0 were interpreted as octal zero?
Religious freedom is the freedom to say that two plus two make five.
|
|
|
|
|
> What would happen if 0 were interpreted as octal zero?
answer 1: Nothing
answer 2: unless the parser expects additional digits {0..7}
|
|
|
|
|
Anything that can be used to distinguish between us, who master it, and them, the primitive people who do not master it, is great!
That goes for all sorts of technology, philosophy, culture, ... Whatever. Anything that let you excel over others is essential to your self image. If it were so simple to understand that your old mother (and grandmother) could easily understand it, then you could impress noone with it.
Religious freedom is the freedom to say that two plus two make five.
|
|
|
|
|
Personally I'm more about the utility and mathematical purity of it.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
I see in my mailbox the last weekly news letter is from January 2024.
Is this now abandoned?
|
|
|
|
|
|
For those who enjoyed playing The hunter: call of the wild or for people who like such laid back games, the fishing version of the game is available for free on epic until tomorrow.
|
|
|
|
|
Can you drink?
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
As a fisherman for 50+ years, in some strange way this makes me sad.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|