I love regular expressions
-
COBOL?
As the aircraft designer said, "Simplicate and add lightness". PartsBin an Electronics Part Organizer - Release Version 1.3.0 JaxCoder.com Latest Article: SimpleWizardUpdate
-
At least the non-backtracking subset. DFA regular expressions. - they are a compact way to describe a simple syntax - they are plain text and brief, easily communicatable and transferable - they are cross platform (at least DFA), running in most any engine - they are incredibly efficient (again, DFA) - they are versatile, able to do validation, tokenization, and matching as well That's probably why they will always be with us. They are maybe the perfect canonical execution of a Chomsky type 3 language. Sure, they can be really terse, but this is as much a strength as it is a weakness, because it facilitates some of the above. I know some people hate them, and I can understand that. But show me a better way.
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
RegExes are like any other tool/language. Great if you've learned how to use it, otherwise you're likely to get annoyed. Many people here probably touch type, but the first time you used a keyboard you possibly thought "why can't they just put the letters in alphabetical order so they're easy to find?" :)
-
COBOL?
As the aircraft designer said, "Simplicate and add lightness". PartsBin an Electronics Part Organizer - Release Version 1.3.0 JaxCoder.com Latest Article: SimpleWizardUpdate
-
RegExes are like any other tool/language. Great if you've learned how to use it, otherwise you're likely to get annoyed. Many people here probably touch type, but the first time you used a keyboard you possibly thought "why can't they just put the letters in alphabetical order so they're easy to find?" :)
StarNamer@work wrote:
"why can't they just put the letters in alphabetical order so they're easy to find?"
A better question is "why are we so enslaved to tradition that we keep using a layout optimized for the Remington No 2 mechanical typewriter over 100 years ago?" And, please, don't get me started on the sexagesimal system used for time and degrees! :D
Mircea
-
At least the non-backtracking subset. DFA regular expressions. - they are a compact way to describe a simple syntax - they are plain text and brief, easily communicatable and transferable - they are cross platform (at least DFA), running in most any engine - they are incredibly efficient (again, DFA) - they are versatile, able to do validation, tokenization, and matching as well That's probably why they will always be with us. They are maybe the perfect canonical execution of a Chomsky type 3 language. Sure, they can be really terse, but this is as much a strength as it is a weakness, because it facilitates some of the above. I know some people hate them, and I can understand that. But show me a better way.
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
Stay away from the vodka!!! Clinton Yeltsin disaster - YouTube[^] :laugh: I do like regular expressions too. But they often turn out to be very complicated to read and error-check.
-
how about natural language to regex translator? such a thing? i am checking.
"A little time, a little trouble, your better day" Badfinger
I used ChatGPT precisely for that and it returned a decent regex with an explanation. I needed to word my question in a manner that was generic but the result was actually helpful.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
-
I don't understand why it's difficult - DFA at least. DFA is () [] * + . | That's not a whole lot to master.
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
Only because there are few operators it doesn't mean it is easy. Binary is only 0 and 1, and look at what can be done with it. :rolleyes: :-D
M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.
-
I don't understand why it's difficult - DFA at least. DFA is () [] * + . | That's not a whole lot to master.
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
-
:) close cobol brings back a lot programming memories
"A little time, a little trouble, your better day" Badfinger
jmaida wrote:
COBOL brings back a lot of programming memories
... and a good therapist helped me deal with them. :)
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.
-
At least the non-backtracking subset. DFA regular expressions. - they are a compact way to describe a simple syntax - they are plain text and brief, easily communicatable and transferable - they are cross platform (at least DFA), running in most any engine - they are incredibly efficient (again, DFA) - they are versatile, able to do validation, tokenization, and matching as well That's probably why they will always be with us. They are maybe the perfect canonical execution of a Chomsky type 3 language. Sure, they can be really terse, but this is as much a strength as it is a weakness, because it facilitates some of the above. I know some people hate them, and I can understand that. But show me a better way.
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
Becoming fluent in regex is they first step to becoming a wizard. But a word of warning, never say them out loud, as there is a very good chance you will summon an evil demon (not daemon).
Nothing succeeds like a budgie without teeth. To err is human, to arr is pirate.
-
They should be called irregular expressions. :-D
-
Thx, learned something new today!
the funniest thing about this particular signature is that by the time you realise it doesn't say anything it's to late to stop reading it
Love your sig 🤣🤣🤣
Paul Sanders. If I had more time, I would have written a shorter letter - Blaise Pascal. Some of my best work is in the undo buffer.
-
StarNamer@work wrote:
"why can't they just put the letters in alphabetical order so they're easy to find?"
A better question is "why are we so enslaved to tradition that we keep using a layout optimized for the Remington No 2 mechanical typewriter over 100 years ago?" And, please, don't get me started on the sexagesimal system used for time and degrees! :D
Mircea
Take my QWERTY keyboard away? Over my dead body!
Paul Sanders. If I had more time, I would have written a shorter letter - Blaise Pascal. Some of my best work is in the undo buffer.
-
Becoming fluent in regex is they first step to becoming a wizard. But a word of warning, never say them out loud, as there is a very good chance you will summon an evil demon (not daemon).
Nothing succeeds like a budgie without teeth. To err is human, to arr is pirate.
So you are fluent, then.
Paul Sanders. If I had more time, I would have written a shorter letter - Blaise Pascal. Some of my best work is in the undo buffer.
-
Stay away from the vodka!!! Clinton Yeltsin disaster - YouTube[^] :laugh: I do like regular expressions too. But they often turn out to be very complicated to read and error-check.
Too funny. Yeltsin was a good sport there.
Paul Sanders. If I had more time, I would have written a shorter letter - Blaise Pascal. Some of my best work is in the undo buffer.
-
At least the non-backtracking subset. DFA regular expressions. - they are a compact way to describe a simple syntax - they are plain text and brief, easily communicatable and transferable - they are cross platform (at least DFA), running in most any engine - they are incredibly efficient (again, DFA) - they are versatile, able to do validation, tokenization, and matching as well That's probably why they will always be with us. They are maybe the perfect canonical execution of a Chomsky type 3 language. Sure, they can be really terse, but this is as much a strength as it is a weakness, because it facilitates some of the above. I know some people hate them, and I can understand that. But show me a better way.
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
I'm absolutely with you on that. Also, with PCREs, the /x switch allows you to indent and comment to your heart's content, so you can write perfectly legible code, and there are on-line engines where you can drop your expression and your input and watch step by step while it does its magic. I'm not sure that I do a day's work without writing a regex and I know of no tool with anywhere near the power for parsing text. ~~~~~~~~ <°}}}>«<
-
At least the non-backtracking subset. DFA regular expressions. - they are a compact way to describe a simple syntax - they are plain text and brief, easily communicatable and transferable - they are cross platform (at least DFA), running in most any engine - they are incredibly efficient (again, DFA) - they are versatile, able to do validation, tokenization, and matching as well That's probably why they will always be with us. They are maybe the perfect canonical execution of a Chomsky type 3 language. Sure, they can be really terse, but this is as much a strength as it is a weakness, because it facilitates some of the above. I know some people hate them, and I can understand that. But show me a better way.
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
The problem with regular expressions, is that most of us use them once every couple of years and we have to relearn everything from scratch every time. For someone who's doing RE everyday, it's simple; I used to have a boss that was like that; we all went to her to write/debug our RE. (and we never document the RE in the code :rolleyes: )
CI/CD = Continuous Impediment/Continuous Despair
-
At least the non-backtracking subset. DFA regular expressions. - they are a compact way to describe a simple syntax - they are plain text and brief, easily communicatable and transferable - they are cross platform (at least DFA), running in most any engine - they are incredibly efficient (again, DFA) - they are versatile, able to do validation, tokenization, and matching as well That's probably why they will always be with us. They are maybe the perfect canonical execution of a Chomsky type 3 language. Sure, they can be really terse, but this is as much a strength as it is a weakness, because it facilitates some of the above. I know some people hate them, and I can understand that. But show me a better way.
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
-
Joking aside, more trivially I believe the term "regular" refers to the third level of Chomsky's hierarchy, which, precisely, is defined as Type3-Regular. DFA (Deterministic Finite Automaton) are FSA (Finite State Automaton).
What the absolute ever. :-D
-
Love your sig 🤣🤣🤣
Paul Sanders. If I had more time, I would have written a shorter letter - Blaise Pascal. Some of my best work is in the undo buffer.