Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "regular expressions"
-
"Some people, when confronted with a problem, think “I know, I’ll use regular expressions.” Now they have two problems." - Jamie Zawinski9
-
My own language, hence my own parser.
Reinvented the regular expression before realizing it already existed (Google didn't exist at the time).
I'm a living reference for regular expressions since then.7 -
From Reddit
Q: Is there a word that describes a fear/phobia of regular expressions?
A: Common Sense3 -
When you have one problem and you decide to use regular expressions...
You need to know this: you have two problems now.3 -
Just found this website for Regular Expressions:
https://regex101.com/
In-case anyone struggles like I do10 -
"Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems." - Jamie Zawinski1
-
"Some people, when confronted with a problem, think 'I know, I'll use regular expressions.' Now they have two problems."
-Jamie Zawinski3 -
Me (as a Senior developer): How will you solve this problem using regular expression?
Junior developer: *Explains*
Me: Good
Junior developer: I truly feel like a programmer when I code regular expressions
Me: Now, we have two problems.26 -
A lot of phrases we use in software would make awesome alternative-rock band names.
- Integer Overflow
- Curly Braces
- Recursion
- Callback Hell
- Daemon Processes
- Nested Loop
- Regular Expressions
Source: Twitter2 -
Woke up at 5am with the realization that I could use regular expressions to parse the string representation of regular expressions to build this program to parse regular expressions into more human-readable English.
I am so tired.7 -
Regular expressions is like a condom, it's safe, combat tested and works most of the time.
But if you use it too much it gets dirty quickly.3 -
Got rejected after final-round interviews with Amazon again. Can’t say it doesn’t hurt, but I understand it.
So to make myself feel better, I started working on the idea I’ve had for a while that I realize is going to be a huge time sink and silly, but I love it.8 -
I spent almost 10 hours coming up with this RegEx. Trial and erroring my way to hell. First I had get rid of the HTML tags (which was easy-ish) then I spent most of my time trying to figure out how to remove the god damn dash but keep hyphenated words ....... Then I found \B and look behinds...
I am making it a point to get good at this shit... Because right now I am petrified of it... Fuck you Regular expression you have taken away all my emotions...14 -
Fuck! I am never gonna get hired again. I fucking suck at live coding. My mind just fucking gets blocked. On simple shit like arrays. I still suck at regular expressions though. Fucking failed Amazon and now wayfare.!!!! Fuck my fucking god dam life.9
-
Regular expressions. I know it's not a tool but damn me if I haven't used it like one. Especially regexr.com1
-
Update on my Facebook and Booking.com interviews. I had them back to back today.
Even before I start, I accept and admit that I am a hypocrite. I hate Amazon yet order stuff from there. I hate Microsoft yet use their products. I hate Facebook yet went ahead to interview with them.
I fucking hate myself for compromising my ethics, values, and integrity. I had promised myself that even if I work for any major shit company, I'd never go with Facebook. Here I am after many years. Not an excuse, but I am doing it because I see it as an entry point into the UK. That's all.
Community's hate towards me is justified and I'd accept the discrimination from this community because this place is my digital home and you all are my family. Infact first thing I told mom was, dR boys are gonna disown me when they get to know about this.
Anyway, coming to the update part.
I had applied leave at work from last Friday. 4 days of leave earned me 10 days off (including weekends and 2 days of Diwali company holiday).
Last Thursday I got to know that Facebook has scheduled their interview today (Friday). I spent insane amount of time preparing. Approximately 8 hours everyday including weekend. I added nearly 40+ hours preparing for it in last 7 days, because I had to get in. Failure isn't an option now.
I sacrifice my family time, preparing for the interview.
I sacrifice Diwali break, sitting in front of the screen and studying.
I sacrifice my only vacation of 2021, doing mock interviews as late as 11.30 PM.
I sacrifice my free time and enjoyment, stressing over what could happen.
I was prepared like perfect for screening stage.
Interview 1: this guy comes and ask 'what is the best compliment you have got as a PM?' and 'Why do you want to quit the current company?'
He wasn't supposed to ask those as per Facebook's policy and interview stage.
Then he gave me a shit problem to solve and rejected my approach and wanted it his was. I tried to follow him and made sure I was able to convince with the reasoning but he kept pushing me back. He kept putting me down. Did not listen to me or what I had to convey or what was expected as an answer. He had certain output in his mind and wanted me to come up with it as an answer.
For the uninitiated: Facebook gives ton of preparation material and tells upfront the kind of questions they'll ask they just focus on few things. Moreover, in Product interviews, there isn't right or wrong answer.
Anyway, this guy started making funny expressions which put my morale down and I stood my ground with losing my cool. I managed to get all my answers right and the key points the look into a candidate. It went decent. Yet the interviewers attitude was something I did not like.
Interview 2: the lady was really kind and warm. Very accommodating and easy person to deal with. It went amazingly well.
I have two observations I want to share with you all.
1. I hate what Facebook does. Lizardberg is awful human being. But I absolutely liked HOW they are doing things, at least from an interview stand point. They even had mock sessions by their PMs and upfront told how to prepare and how to answer.
2. While it seems to be a 5 star experience, I found them to function mechanically. No small talk, no human connection (ironic to their mission), no conversational flow of the interview (again something that they kept saying a zillion times in all their material). They came, formally introduced themselves, and had a checklist kind of attitude, and left.
I now await for the feedback.
In the next hour, I had Booking.com first round.
Amazing people. Warm friendly experience. Treated me as a human. Heard me. Made me feel part of the conversation rather than someone just being judged.
It went 1000x better than Facebook.
I await the feedback from them as well.
I don't know what's gonna happen but one thing for sure, the kind of expectations Facebook set for their interviews, was nowhere close to the reality. It was awful.
180° was for Booking.com
Guess the saying stands true, expectations always lead to disappointment.
Finally I feel de-stressed and my Diwali vacation starts AFTER Diwali ended. Or rather just a regular weekend.
2021 has been terribly awful year for me. Hope this shitty year ends soon.30 -
Came across this company when I was looking for regex for organization-ids/organization-numbers. 😂8
-
I'm a php developer.
I don't like preg functions (regular expressions) and i don't remember exactly the syntax for alternate words.
I googled, and this is what I found.
An heart attack.5 -
Had a job interview today as a Junior Python dev. The hardest part: they asked things, that I used to learn in some time in the past, but got rusty in my memory because I don't use em much. Like "to write func that sorts array". Last time I was writing sorting without standard library at least half a year ago. Same with the regular expressions (need em the most once in several months) or sql expressions (last time - 7 month ago). How to remember these things?9
-
Why WordPress is not very good:
I wrote a quick 230 line python script that uses the power of urllib, ebooklib and 12 regular expressions that would make any italian proud to download webnovels from virlyce.com and turn them into .epub files for me.
The chapters are all individual WordPress pages, and after sequentially downloading only 202 of them I got an internal server error.
Why, WordPress?
Of course, I saw this coming and put mitmproxy to good use caching everything, so even though my python script with terrible error handling crashed I don't have to do it all again (yay)4 -
At one point I understood a lot of git internals. Now I don't remember shit apart from the small subset of commands that I use everyday.
How does one remember such intricacies.
Also same with regular expressions xD6 -
Guys. GUYS. There are so many freaking weird edge cases for regular expression evaluation. *head desk*8
-
Elasticsearch, from the bottom of my heart...
How can one ecosystem be so batshit crazy inconsistent?
Seemingly every agent does the same (e.g. filebeat vs journalbeat vs packetbeat)… yet there are subtle changes in configuration everywhere.
Plus YML. The most shitty markup language one can use and the cockslubbing durps used it fucking everywhere.
Makes fun to have complex stuff and requiring a python Jinja to JSON to YML converter to be able to write the complex stuff without having the fucking migraine to count like a stupid 4 year old whitespace with both hands...
To make it even more absurd: the ingest pipelines which contain a lot of regular expressions / grok and are thus very prone to quoting issues... Yes. Let's do this in YML too.
If you need to add an fucking manual section how to debug YML errors you should have realized what a fucking stupid idea it was, morons.
Now I have the joy of having a python script regex quoting the shit for a Jinja template which then generates JSON which then generates YML.
Why the JSON part?
Yeah... Because ECS and changes in the upstream YML files / GitHub.
To be able to run diffs in a sane way because in YML distinguishing thing is pretty much impossible, so JSON as an intermediary format solely for the purpose of converting upstream YML to JSON to diff it against modified JSON ingest pipelines downstream.
I fucking hate elasticsearch8 -
After much muttering about making a program to parse regular expressions into more human-readable English, I think I'm finally at the point that I'd like to invite you to try it out.
Notes:
- I do not claim this is perfect. I know for a fact there are things I haven't added yet -- hexadecimals, for example. *shudder* -- and I'm sure there are edge cases I haven't figured out yet
- I would welcome any feedback.
- Please be kind.
https://github.com/AmyShackles/...8 -
Me: Alright Derwent, don't fuck up this database update. There's no undo button and no way to import a database backup so you gotta be extra careful or you're going to have to spend hours writing a whole bunch of regular expressions and sql statements to sift through an 11mb database dump and figure out how to restore 59 thousand records to the correct state. Let's practice this transition on a staging server first and make sure we get it right
Me: I got you fam *presses the wrong button* -
If you were to write a regular expression to match phone numbers in the format of either:
(123) 456-7890 or
123-456-7890
Would you prefer a regular expression that looked like:
A) /^(?:\(\d{3}\) |\d{3}-)\d{3}-\d{4}$/g
B) ^\(\d{3}\) \d{3}-\d{4}$|^\d{3}-\d{3}-\d{4}$/g
C) Other
D) I hate regex
Reasoning? Alternative? Discuss.
(I'm curious about preferences surrounding the readability of regular expressions)19 -
Is it even possible to get good enough at regular expressions where you can just write it and you don't have to search stackoverflow for one that works?9
-
I thought I had a great understanding of regular expressions but today I tried to use them in vim... Why the fuck they have to be so different there??4
-
Started new course called "Introduction to natural language processing" in uni. I am super bad at doing regular expressions and don't understand anything about them.
Saw the first weeks homework. Have to do i.e. some text cleanup with regex... I was sad. But now after reading the course material and trying some of the exercises I'm super excited since I'm actually doing something "real" with it.
Do you guys just love it when teaching material is well written? I do.3 -
A famous quote attributed to Jamie Zawinski:
"Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems."
I am living this nightmare. Joined a project where schmucks are parsing SQL using regular expressions. Talked to a friend, a compiler developer expert. He told me that regexes can't be used for checking if braces are matched. Pumping Lemma. Those fuckers should have used ANTLR or something. Anyways planning to leave this project.2 -
Never understood the hate for regular expressions, it's just one more useful tool in my eyes. Anyone want to weigh in?9
-
The worst thing is to spend hours wondering why a regex isn't getting the right values. Then I edit the regex and when I used undo on my changes, all of a sudden it worked. No idea why...
-
So appearantly what passes for the space character in regular expressions in ssms is :b. Sure, Microsoft. Makes total sense. \s was just too convoluted.1
-
I developed a simple feedback form, that captures user feedback and forwards it to a customer care email.
Today, I received a call from someone who was sub-contracted to create a system that would ingest these feedback emails and process the data to have some desired result.
So dude wants me to change the way the email is formatted. Because there are "line feeds" in the email. Essential making it computer readable as opposed to human readable. I don't have a problem doing that but I'm wondering if he ever heard of regular expressions.3 -
Is it sad that I look forward to the weekend so that I can actually write some code rather than:
- Helping clients that can’t / won’t read docs
- Explaining to test colleagues that we need repro steps and can’t fix a bug based on “I was doing something and it crashed”
- Writing any regular expressions for another dev where it’s more complicated than ^[A-Z0-9]*$
- Wading through legacy VBA that’s littered with GoTo, global variables (even i, j and k for loops are fucking global!) and all the other fucking lazy shortcuts that save you 10 seconds at dev time and cost you (which ends up meaning me) hours in subsequent debugging.
I love writing code, and I think I’m pretty good at it, so can I please just get on with it?
Fellow ranters, please tell me I’m not alone in this. -
Current work in progress: https://whimsical.com/regular-expre...
Though I’ll warn you, if you’re on mobile, it’s going to look suspiciously like a blank page. It’s not. Just.... requires a lot of scrolling. 😅4 -
Typo3.
Especially when it comes to debugging third party (usually outsourced) plugins and implantations..
It's daz vile wild west over there, you never know where something is defined, but more often that not, some obscure TypoScript file.
Never have i been so grateful for xdebug & grep / awk combined with regular expressions.. -
My biggest pet peeve is that too many developers don't realize that "regex != regular expressions", probably because of bad naming and bad documentation. It's easy to assume that they're the same, but most regex syntaxes today are actually at least context-free grammars, since they support backreferences.7
-
I pitched this crazy sentiment analysis story and it got approved.
Which is great... only now, I have to start learning regular expressions to tokenize my data. Regular Expressions are the worst. 😒5 -
Arghhhhh working with regular expressions (already a bad start) got it working on my dev PC but it won't work on the server.
The only difference is my pc is running PCRE v8.41 and my server is running v8.42. Can't find anyone else having the same issue on SO/Google8 -
Some people, when confronted with a problem, think “I know, I’ll use regular expressions!”
…and now they have two problems. 🤦♂️🤷♂️6 -
Oh look, the code points each script_extension matches when using Unicode property escapes in JavaScript regular expressions.
https://gist.github.com/AmyShackles...
Annnnnd apropos of nothing, I’m trying to learn Hungarian on the side for fun because I made a Hungarian friend. Forgot how hard language learning was!1 -
My CS (theoretical foundations of computer science, specifically) professor is currently teaching regular expressions... Has been for three weeks. Same thing over and over. All of his examples involve using regular expressions to parse HTML. He just told us to write a script (using Perl-style regex) that would recursively find and follow link tags in various websites. Just... no...1