I love regular expressions
-
How the hell would someone know that "[0-9]{1,3}" is enough to find sequential numbers in Microsoft Word? How the hell did I find that magic? Every regular expression seems to require a convoluted google search. Crazy world...
Our Forgotten Astronomy | Object Oriented Programming with C++ | Wordle solver
If you give programmers super-compact notation, such as APL, they scream in horror: That is unreadable cryptic! If you give them readable regular expressions, such as in SNOBOL, they scream in horror: That takes at least twice as many keystrokes! The rule is simple: If we have learned the cryptics, it is excellent. Otherwise it is detestable. Obligatory URL: Geek&Poke: Yesterday's regex[^]
-
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
-
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
They should be called irregular expressions. :-D
-
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
-
how about natural language to regex translator? such a thing? i am checking.
"A little time, a little trouble, your better day" Badfinger
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
-
They should be called irregular expressions. :-D
Ron Anders wrote:
They should be called irregular expressions.
Or ChineseExpressions, because I'll become more proficient in Chinese before RegEx!
As the aircraft designer said, "Simplicate and add lightness". PartsBin an Electronics Part Organizer - Release Version 1.3.0 JaxCoder.com Latest Article: SimpleWizardUpdate
-
If you give programmers super-compact notation, such as APL, they scream in horror: That is unreadable cryptic! If you give them readable regular expressions, such as in SNOBOL, they scream in horror: That takes at least twice as many keystrokes! The rule is simple: If we have learned the cryptics, it is excellent. Otherwise it is detestable. Obligatory URL: Geek&Poke: Yesterday's regex[^]
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
-
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.