|
Like anything in development, if you abuse it then it’s a problem.
But, if you have a dev that doesn’t want to learn… Then fire dev that doesn't want to learn and hire one that can.
These days there are so many parsers to explain patterns there’s no reason.
Jeremy Falcon
|
|
|
|
|
It's something I use when I have to but have it on my list to lean more about.
I could have really used that knowledge recently when I wanted to search for any stored procedure called in the code where one of the parameters supplied is a Boolean value.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
modified 4-Jul-23 3:38am.
|
|
|
|
|
Regex is great for scripts, rudimentary parsers, input validation, etc. So, props for putting it on the todo list at least. Already puts you ahead.
It may look like Klingon to the untrained eye… but if you’re good at it you’ll never have a problem again with moving around data / transformation and so on. Especially when a full-fledged app isn't called for.
Jeremy Falcon
|
|
|
|
|
Thanks Jeremy,
I have now started using it more in searches and it has made something of a difference.
I really should have been making use of it more, but like you say the Klingon-like appearance puts a lot of us off from using it.
I have found a cheat sheet which helps a lot and using it both as practice and in use.
The interesting part I have found so far is that different text search engines(i.e. 'find' applications) process end of line characters differently, so using the right tool makes a difference too - AgentRansack is not great with end-of-line characters in regular expressions but VS Code seems to work with \r and \n.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
GuyThiebaut wrote: The interesting part I have found so far is that different text search engines(i.e. 'find' applications) process end of line characters differently, so using the right tool makes a difference too - AgentRansack is not great with end-of-line characters in regular expressions but VS Code seems to work with \r and \n. Yeah, if I had one gripe about regex it would be that. If it's PCRE compatible regex you're learning though, that'll make it easy enough to adapt to the minor differences in implementation. Just know, if you're using tools like grep or sed in Linux, you'll need to enable extended regex to get something that's more close to PCRE.
Jeremy Falcon
|
|
|
|
|
Not clicking that.
I don't see why there would be a video about it rather than an article.
|
|
|
|
|
It's a video explaining an article. We just went meta up in here.
Jeremy Falcon
|
|
|
|
|
I'd prefer to read the article.
|
|
|
|
|
|
|
|
PIEBALDconsult wrote: Not clicking that.
This is the second time that I know of, where you make a big stink about YouTube links. THEY ARE LEGIT LINKS.
Many biological humans on the planet Earth, use YouTube to learn stuff. Learning stuff on YouTube is cool and awesome and gives you warm fuzzy feelings.
|
|
|
|
|
Slacker007 wrote: THEY ARE LEGIT LINKS. You never know... could be surfing the web from a text-based terminal browser. Because that's what elite hackers do yo.
For real though, peeps have different learning styles. We should just be happy peeps are learning - regardless of how they do it.
Jeremy Falcon
|
|
|
|
|
are you opposed to viewing YouTube ? if so i do not understand why as it is amazing the ease to which it is possible to learn of many new fascinating subjects and then to learn and study to some mastery . only yesterday i learned of the "HyperLogLog, an algorithm that leverages random chance to count the number of distinct items are in a dataset" also some time ago from a superb series i finally learned what tensors are and of course posted topic . many such superb series are available . -Best
|
|
|
|
|
I don't know why PIEBALD doesn't want to learn from YouTube but I can tell you my reason: because I'm slow. I like to learn in my own pace turning pages one by one, and sometimes going back on a topic and reading it again. This doesn't happen when a guy fast-talks at me. Just give me an old fashioned text and let me dig through it in my own turtle-like speed.
Mircea
|
|
|
|
|
three cheers hip ! hip ! hooray ! on my personal blog i have an article espousing precisely that . also a YouTube video of the text which no-one has viewed . - Best
|
|
|
|
|
PIEBALDconsult wrote: I don't see why there would be a video about it rather than an article.
Myself I prefer reading. But I am a fast reader.
But videos seem the rage. A while ago I attempted to start learning javascript via a video course. Obviously for beginners. He spent about 15 minutes explaining what a variable was. So useless for me.
|
|
|
|
|
Sounds like magic, I am wondering how big a number can be tested with the regex hmmm....
|
|
|
|
|
That, I assume, depends on the limitations of the parser. If the parser is written in C or C++, and they use size_t for counting, that could allow finding all primes until at least 65,5352 = 4294836225.
This algorithm is extremely inefficient - O(n2) for each 'n', or O(n3) for all primes less than n. You will run out of time well before you run out of primes.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
|
Yes, but Mersenne primes have special formats (in base 2). It's not as if we know all the primes up to 282,589,933 - 1.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Unconvinced early growth back markers (7)
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
Nice!
Ah, sod it - I'll bite...
Unconvinced
early growth bud
back DUB
markers IOUS DUBIOUS
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Nice and easy for Monday
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
#Worldle #527 2/6 (100%)
🟩🟨⬜⬜⬜➡️
🟩🟩🟩🟩🟩🎉
https://worldle.teuteuf.fr
knew where but not the name so used map
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|