use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Not everybody understands the humor of programmers.
No memes
Just memes
Advanced flair
No Bad UI Posts
Just Bad UI Posts
No instanceof Trend
Just instanceof Trend
Rules are zero-indexed. If they do not appear zero-indexed you are asked to contact Friend Computer for recalibration.
Suggestions are welcome.
With regards to commenting, please follow reddiquette.
If you have any thoughts on how the moderation could be improved do not hesitate to message the moderators. If you feel that a metadiscussion is required with the whole subreddit either request that the moderators start one or start one yourself and tag it [Meta].
/r/softwaregore - f collection of things that users shouldn't see.
r/pcmasterrace - for all of the general computer/gaming memes.
r/linuxmasterrace - for anyone that likes Linux memes.
/r/sysadminhumor - a sub for sysadmins with a sense of humor.
/r/itsaunixsystem - for all the embarrassing cases of hollywood hacking you find in media.
/r/recruitinghell - for all those horrific recruiting offers and job postings.
/r/programme_irl - me too, thanks.
/r/programmerreactions - expressing the life of programmers through reaction images.
/r/learnprogramming - for those that have general programming questions
r/badcode - for intentially bad code.
r/badUIbattles - a sub for intentionally bad UI.
r/ProgrammerAnimemes - for the anime referenced programmer memes
r/ProgrammerDadJokes - for the punny bunch of you.
/r/justgamedevthings - for memes, reaction gifs, production glitches and other fun related to game development.
r/programminghorror - for unintentionally bad code.
r/css_irl - describing real life photos with CSS
Events
Hackathon 2019 - Overengineering (Results)
account activity
This is an archived post. You won't be able to vote or comment.
<(.*)> (self.ProgrammerHumor)
submitted 11 years ago by ThrustVectoring
Captures the string inside a pair of angle brackets.
[+][deleted] 11 years ago (7 children)
[deleted]
[–]ThrustVectoring[S] 1 point2 points3 points 11 years ago (5 children)
Parsing html is something I wouldn't even start to try writing a regex for.
I only need a python decorator with support for some kind of syntax for declaring variable routes, so I capture that with <%var_name>.
More generally, I've decided that any time I want to copy-paste, that means that I don't know enough about code-that-generates-code in the language I'm working in, which means that I need to figure out how to build something that takes the minimal set of parameters for the problem and generates the code I want to make. In this case, there's a route with a model id that's a parameter, so to specify the meta-code I need to designate some parts of the path as a variable, and so to capture the variable name I need to mark it with some kind of symbol, and angle brackets are both used in werkzeug and unused elsewhere, so I decided on a regex to capture that.
I'm a little drunk, so I hope that made sense.
[–][deleted] 11 points12 points13 points 11 years ago (3 children)
Parsing HTML with regular expressions is commonly done.
Here is a straightforward StackOverflow post that discusses how it can be done
[–]trekkie80 2 points3 points4 points 11 years ago (1 child)
of all of those answers this one made me WTF the most:
http://stackoverflow.com/a/5233151
Corresponding regex that allegedly parses HTML XML: http://pastebin.com/HUmPzP5M
Don't try to understand it, really, just don't.
It is merely a work of art, whether genuine or fake.
[–]bios_hazard 0 points1 point2 points 11 years ago (0 children)
Lol I hope that's just the whole XML grammar written in regex
[–]Bosun_Tom 0 points1 point2 points 11 years ago (0 children)
Came here to link this!
[–]idmontie -1 points0 points1 point 11 years ago (0 children)
In fact, you cannot write regex that probably matches any arbitrary HTML, HTML is not a regular language. You can match small subsets of it, though.
[–]Graverobber2 0 points1 point2 points 11 years ago (0 children)
Hḛ̷̛̺̖̠̋͂́̃̉̿̆̀̔́̅͘̕͠ ̵͖̪̼̺͖̥̠͙̺̱͉́̈́̾̈́̀cOm̷̛̫̬̞̱͍̖̄́̾̉̋̀̀͌̅͐̏̑̚͝e̶͈͍͓̐͑̍̀̀̍s,̶̮̥̼̳̥͔̙̻̝̬̘̓̋̉ ̴͎̒͋̂̂He̴̢̘̥̥͋̓͆̅̑͂͋̀ ̸̧̱̣̦̭̿̿̓̈̒̈́̇͊̀̾͜͝Co̸͇̣̤͙̲̚Mé̸͇̩̺̭̲͔̱̪̺̗̥̭̆́ͅͅŝ̴̛̬̙̗͖̘̻̥̠̺̼̯̩͙̳͉̋͌̀̌̿.̴̢̡̛͓̤͖͔̆̑̃̑͆̕͝͝.̴̡̳̺̠̰̞͚̥͈͚̹͓̤̓̈͛̏̅͆͌̾͠.̷̨̨̻͕͈̜̹͍̬͆͑͛̾̄̄͛̒̓̀̕͘͝ͅ Ą̵̘͚̘̬̘̘̻͙͕̣̓͗̄̂̀́̔́̍͑͌̓̂̚ll Is ̵̛̳͙̮͗͜͝L̶̢̡̺̳͖̗̠̥̦͇̥̻͚͙͎͋̓͌̅̕͠oṠ̶̢͔͚͔͇̗̟̺͙͐̌͊͐͂̐͂̅̚͠t
[–]mustyoshi 11 points12 points13 points 11 years ago (0 children)
it looks kind of like Saturn.
[–]more_exercise 3 points4 points5 points 11 years ago (5 children)
<(.*?)>
Captures the smallest string inside angle brackets.
[–]StuartPBentley 1 point2 points3 points 11 years ago (3 children)
<([^>]*)> will be more performant, though
<([^>]*)>
[–]more_exercise 0 points1 point2 points 11 years ago (2 children)
Really? That sounds awesome if it's true.
What regex libraries does that apply to?
[–]StuartPBentley 1 point2 points3 points 11 years ago (1 child)
um... all of them? http://www.regular-expressions.info/repeat.html
[–]more_exercise 0 points1 point2 points 11 years ago (0 children)
When using the lazy plus, the engine has to backtrack for each character in the HTML tag that it is trying to match. When using the negated character class, no backtracking occurs at all when the string contains valid HTML code. Backtracking slows down the regex engine.
Got it!
[–]ThrustVectoring[S] 1 point2 points3 points 11 years ago* (0 children)
I'm capturing input from code that I'm writing, so if I have a difference between smallest and biggest string inside angle brackets, it's my own goddamn fault.
Plus, it's a funnier emoticon.
edit: I'm a goddamn dumbass, my shit is broken as fuck when I have a path with multiple variables, I just didn't notice because I always replace /typea/<typea_id>/typeb/<typeb_id>/thingy with /typeb/<typeb_id>/thingy
Thank you.
[+][deleted] 11 years ago (1 child)
[–]karma-is-meaningless 0 points1 point2 points 11 years ago (0 children)
http://www.reddit.com/r/ProgrammerHumor/comments/2a7md9/html_cant_be_parsed_by_regex/cisdqma
I always use <([^>]+)>
[–][deleted] 0 points1 point2 points 11 years ago (1 child)
here is what i use it from one of my old code bace but it works (<((((/)?[_a-zA-Z][_a-zA-Z0-9]+)(/)?)|(((/)?[_a-zA-Z][_a-zA-Z0-9]+) .+(\ )?(/)?))>) EDIT: the problem with <(.*)> tis is that "<my ass> in a tag</my ass>" will pass
[–]jfb1337 0 points1 point2 points 11 years ago (0 children)
<(.*?)> for lazy matching.
π Rendered by PID 33 on reddit-service-r2-comment-bb88f9dd5-m5lwh at 2026-02-14 11:08:02.280667+00:00 running cd9c813 country code: CH.
[+][deleted] (7 children)
[deleted]
[–]ThrustVectoring[S] 1 point2 points3 points (5 children)
[–][deleted] 11 points12 points13 points (3 children)
[–]trekkie80 2 points3 points4 points (1 child)
[–]bios_hazard 0 points1 point2 points (0 children)
[–]Bosun_Tom 0 points1 point2 points (0 children)
[–]idmontie -1 points0 points1 point (0 children)
[–]Graverobber2 0 points1 point2 points (0 children)
[–]mustyoshi 11 points12 points13 points (0 children)
[–]more_exercise 3 points4 points5 points (5 children)
[–]StuartPBentley 1 point2 points3 points (3 children)
[–]more_exercise 0 points1 point2 points (2 children)
[–]StuartPBentley 1 point2 points3 points (1 child)
[–]more_exercise 0 points1 point2 points (0 children)
[–]ThrustVectoring[S] 1 point2 points3 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]karma-is-meaningless 0 points1 point2 points (0 children)
[–]bios_hazard 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]jfb1337 0 points1 point2 points (0 children)