Skip to content
DevMeme
2886 of 7435
Regex purist corrects LGBTQ+ to LGBTQ.* for true wildcard inclusivity
Languages Post #3191, on Jun 6, 2021 in TG

Regex purist corrects LGBTQ+ to LGBTQ.* for true wildcard inclusivity

Why is this Languages meme funny?

Level 1: Adding vs Including

Imagine you see a sign that says "Everyone is welcome, LGBTQ+ invited!" Most people read that plus sign as just meaning "and anybody else, all are included." Now picture a very literal-minded friend who treats that + like a strict rule from math or code. This friend furrows their brow and says, "Actually, that plus sign means you should only add more Q's!" 🤨 It's as if someone read a party invitation for "Alice + family" and tried to bring multiple copies of Alice because they took the "+" to mean "duplicate the same thing" instead of "and anybody she wants." Ridiculous, right?

The humor here is that the person is thinking like a computer, not like a normal human. They're joking that to truly include everyone, you shouldn't use a plus sign the normal way – you should use a big "anything goes" symbol (like saying "and then absolutely anything after that"). In plain terms, it's funny because the person is over-complicating a friendly "everyone's invited!" with a nerdy, literal rule. It’s a bit like correcting someone who says "and others" by insisting they list out literally every possible other! It's silly and overly precise, which is exactly why it makes people laugh. Even if you don't know anything about coding, you can giggle at someone missing the obvious meaning of a plus sign just to enforce a made-up technical point. The joke shows how a programmer's brain can twist a simple "+" into a wild "include everything" instruction – all in the name of being extra inclusive!

Level 2: Regex 101: Wildcard vs Plus

Let's break down the humor in simpler technical terms. First, LGBTQ+ is an acronym commonly used to refer to the LGBTQ community (“Lesbian, Gay, Bisexual, Transgender, Queer plus other identities”). The soft rainbow-gradient background of the image is a nod to the Pride flag, clueing us in that this is about inclusivity. Now, here's where the coding twist comes in: the person in the meme is treating that plus sign (+) as if it were part of a regular expression pattern!

Regular expressions (regex for short) are like mini programming languages for matching text patterns. They use special symbols (called metacharacters) to represent rules. For example, in regex the dot . means "any character," and a plus sign + means "one or more of the preceding element." So if you see A+ in a regex, it doesn't mean a literal "A+;" it means "the letter A repeated one or more times." Similarly, an asterisk * means "zero or more of the preceding element." If you see A*, it can match "", "A", "AA", "AAA", etc. (including the possibility of no A at all, since zero is allowed). These symbols are known as quantifiers because they quantify how many characters or repeats are allowed. And a "wildcard" in regex is often the . character, since it can stand for any character. Combining the wildcard . with the quantifier * (.*) means "match any sequence of characters of any length."

Now let's apply that to the meme. The joke suggests using LGBTQ.* instead of LGBTQ+. Imagine these as two regex patterns:

Pattern: LGBTQ+  
Meaning: "LGBTQ" followed by one or more "Q"s.  
Matches: "LGBTQ" (yes – one Q), "LGBTQQ" (yes – two Qs), "LGBTQQQ" (yes – three Qs), etc.  
Does NOT match: "LGBTQA" (no – 'A' is not a 'Q'), "LGBTQIA" (no – the next char after Q is 'I', not another Q).
Pattern: LGBTQ.*  
Meaning: "LGBTQ" followed by any sequence of characters (.* is a wildcard for anything).  
Matches: "LGBTQ" (yes – nothing extra after Q is fine), "LGBTQA" (yes – 'A' can be matched by .*), "LGBTQIA" (yes – "IA" fits in .*), "LGBTQXYZ" (yes – whatever follows is okay).  
Essentially, any string that **starts** with "LGBTQ" will match this pattern.

Do you see the difference? In the first pattern, + attaches to "Q" and restricts what can come after "LGBTQ." It says: you can have extra characters, but they must all be the letter "Q". In the second pattern, .* after "LGBTQ" says: you can have anything (any letters, numbers, or symbols at all) after "LGBTQ". In regex terms, .* is as inclusive as it gets – it's a wildcard that doesn't care what comes next – whereas + is picky (it only allows more of the exact same thing).

For someone new to regex, think of it this way: The meme is pointing out a kind of "spelling detail" in geek-speak. The plus sign in "LGBTQ+" is meant to be a literal plus sign meaning "and more people." But the developer in the meme jokes that, if this were code, that plus sign is being used wrong – you'd want .* to truly mean "and anything else." It's a playful illustration of how a tiny symbol can change meaning between normal language and programming language.

The humor also lies in the developer's overly literal mindset. Beginners learn quickly that computers take things very literally – if you give a computer a pattern LGBTQ+, it will interpret + in its special regex way, not as a regular plus character. The person in the meme is applying that same strict rule to a non-computer phrase. It's like they can't turn off their coder brain, even when looking at an everyday term! For a junior developer still learning, this meme is a lighthearted lesson in context: in coding, symbols like + or * have predefined meanings (like quantifiers in regex, or like addition and multiplication in math). We always have to ask, "Do I mean the literal '+' or the regex '+'?" Here, the developer jokes that in a pattern matching context, you'd use the wildcard .* to be truly inclusive. In normal English, no one expects you to think that way, which is exactly why it's funny.

In short, the meme is sneaking in a mini regex lesson under the guise of a joke. It shows how LGBTQ+ and LGBTQ.* would behave very differently if you ran them as actual code. By understanding that, even a newer coder can appreciate why the "regex purist" is making this tongue-in-cheek correction. It's a fun example of the crossover between programming syntax and everyday language, demonstrating the kind of nerdy joke developers love to make once they learn about things like regex wildcards and quantifiers!

Level 3: Pedantic Pattern Purist

For an experienced developer, this meme is a prime example of developer humor born from our pattern-obsessed brains. The image text itself reads:

"It should be LGBTQ. not LGBTQ+ because the latter only matches LGBTQ, LGBTQQ, LGBTQQQ, etc."*

This line is delivered in the classic tone of a know-it-all regex aficionado who just cannot resist a pedantic correction. It's funny because we all know someone (maybe ourselves) who would gleefully point out that small technical detail. It's the archetypal "well, actually..." moment, applied to inclusive terminology. In a room of engineers, you can practically hear the groans and laughter as soon as the regex purist pipes up with this overzealous developer literalism.

What makes this hilarious to seasoned coders is the juxtaposition of a social term with syntax precision. "LGBTQ+" is meant to be an inclusive shorthand in everyday language (the "+" meaning "and others"). But the developer brain immediately parses that plus sign as if it were code: + has a very specific meaning in regex. A veteran programmer knows that mixing up your regex quantifiers can lead to bugs or unintended matches. (How many of us have lost an hour debugging because we used * when we meant +, or vice versa?) So seeing LGBTQ+ in the wild, the inner coder chuckles and thinks, "Heh, that plus is a bit too literal... shouldn't it be a wildcard?" The meme basically vocalizes that inner geeky thought. It's a form of syntax humor where the punchline only lands if you understand the rules of the little language inside regex.

This resonates with engineers who have debated regex nuances or argued over the "right" way to write a pattern. It's common in code reviews or programming discussions to encounter the regex guru who insists on the perfect pattern for every scenario. Here, that attitude is exaggerated to the point of absurdity: correcting an inclusive language acronym as if it were a poorly-written code snippet. It's funny because it's so unnecessarily thorough. The regex purist in the joke treats "LGBTQ+" not as a simple plus sign meaning "and more", but as a flawed pattern that matches the wrong thing. And from a coder's viewpoint, they kind of have a point – LGBTQ+ in regex would indeed only capture strings with extra Q's, missing cases like "LGBTQIA". The insistence on using LGBTQ.* is like a hyper-logical solution to make sure everyone is included, by literally matching everything after "LGBTQ". It's an extreme literal take on being inclusive: if one plus is good, then dot-star must be better!

For senior devs, there's also an extra layer of chuckling at this whole wildcard vs plus comparison. Typically, using a broad wildcard like .* can be risky or lazy in real code (it's the infamous "match anything" pattern that can unintentionally gobble up too much text or cause performance issues). We often tell junior devs to be careful with wildcards in regex. Yet here, that normally frowned-upon .* is humorously portrayed as the morally superior choice because it's more "inclusive." This role-reversal is comedy gold for anyone who has written complex regexes: the one time it's socially correct to use a greedy catch-all is in a meme about encompassing all gender identities! It's a nerdy reminder that context is everything — what's overkill in production code becomes a brilliant joke in a Pride-month chat among programmers.

Ultimately, the meme gets a knowing smile from seasoned developers because it's absurdly on point. It captures how a coder's mind can leap to technical details in any situation. We see the rainbow-colored backdrop and the earnest idea of inclusivity, and then we see the punchline: a pure pattern-matching twist. It's a perfect storm of coding humor and cultural reference. The joke doesn't poke fun at the LGBTQ community at all; if anything, it playfully one-ups the language to be even more inclusive (in a comically geeky way). It's laughing at our own impulse to optimize and over-define, turning a simple phrase into a mini coding project. In the end, "Regex purist corrects LGBTQ+ to LGBTQ.*" is the kind of one-liner senior devs will screenshot and send around, saying "Haha, guilty as charged!" — because it hits close to home in the nerdiest way possible.

Level 4: Kleene Closure Conundrum

At the most theoretical view, this meme plays on the formal language concepts behind regular expressions. In regex (short for regular expression), symbols like * and + represent the Kleene star and Kleene plus operators, named after mathematician Stephen Kleene's work on automata theory. These are examples of regex quantifiers that define closure properties in a pattern: X* means "zero or more of X" (allowing an empty sequence) and X+ means "one or more of X" (requiring at least one occurrence). In other words, the + quantifier in LGBTQ+ applies specifically to the letter "Q", while the .* sequence combines a wildcard . (match any character) with the * quantifier to allow any number of any characters.

Under the hood, each of these regex patterns corresponds to a regular language (a set of strings) recognized by some finite automaton. The pattern LGBTQ+ can be formalized as the set of strings ${\text{"LGBTQ"}, \text{"LGBTQQ"}, \text{"LGBTQQQ"}, \ldots}$ – an infinite but very specific language consisting only of "LGBT" plus one or more trailing "Q"s. By contrast, LGBTQ.* denotes the set ${, w \mid w \text{ starts with "LGBTQ"},}$, which includes any string beginning with "LGBTQ" and then followed by zero, one, or many arbitrary characters. This means LGBTQ.* matches "LGBTQ" by itself (zero extra characters), as well as "LGBTQA", "LGBTQIA", "LGBTQXYZ", or any other extension. In regex syntax, . is a wildcard matching any single character, and .* is a famously greedy construct that can absorb any sequence of characters. Thus, the language defined by LGBTQ.* is a superset of the language defined by LGBTQ+ — it encompasses all the strings that LGBTQ+ matches (like "LGBTQ" or "LGBTQQ") plus many more (any additional letters, not just Qs).

We can even imagine the difference in terms of finite state automata. The automaton for LGBTQ+ would proceed through states reading "L", "G", "B", "T", "Q", and then loop on the "Q" state for each additional Q encountered, rejecting as soon as a non-"Q" character appears afterward. In contrast, the automaton for LGBTQ.* would, after reading the prefix "LGBTQ", transition into a "wildcard" state that has a self-loop on every character. Once in that state, it doesn't matter if the next character is Q, A, Z, or even a space – every possible symbol is accepted indefinitely. In essence, LGBTQ.* puts the machine into an "accept anything" mode after the initial prefix, whereas LGBTQ+ keeps the machine in a more constrained loop that only tolerates more Q's.

From this formal perspective, the meme's pattern matching joke is delightfully precise. The + symbol in the phrase "LGBTQ+" is intended in plain English to mean "and then whatever other identities come next" (an inclusive shorthand). But a hardcore regex geek spots that, in regex language, + doesn't mean "whatever". It's a metacharacter with a very literal mandate: repeat the previous token. Here that token is "Q", so LGBTQ+ in code only covers repeated Q's (a much narrower interpretation of "plus"). On the other hand, the .* sequence truly is a wildcard – it stands for "match anything following the 'LGBTQ' prefix". So from a regex purist standpoint, LGBTQ.* more faithfully captures the spirit of "LGBTQ plus whatever comes next" than LGBTQ+ does. It's a nerdy realization that the inclusive intent behind the plus sign can be better expressed with actual code syntax. In true developer literalism fashion, the meme humorously "corrects" a socially inclusive term using the exacting logic of computer science fundamentals.

Description

The image shows a soft rainbow-gradient background with pastel bands of green, yellow, blue, pink, and purple fading into one another. Centered in bold black text is the full caption: “It should be LGBTQ.* not LGBTQ+ because the latter only matches LGBTQ, LGBTQQ, LGBTQQQ, etc.” The joke uses regular-expression syntax - “.*” as a greedy wildcard versus “+” as a one-or-more quantifier - to poke fun at overly literal developer minds applying pattern-matching rules to social terminology. It relies on knowledge of regex quantifiers and character classes, highlighting how developers instinctively think about edge-cases and precise string matching even in non-technical contexts. The humor resonates with engineers who have debated regex semantics or been pedantic about pattern correctness

Comments

38
Anonymous ★ Top Pick Updated the conduct policy to /LGBTQ.*/; legal bounced it back - apparently “greedy inclusivity” introduces unbounded scope in both regex and compliance budgets
  1. Anonymous ★ Top Pick

    Updated the conduct policy to /LGBTQ.*/; legal bounced it back - apparently “greedy inclusivity” introduces unbounded scope in both regex and compliance budgets

  2. Anonymous

    After 20 years of debugging regex patterns in production, you realize the real challenge isn't matching strings - it's explaining to stakeholders why your inclusive wildcard pattern just matched 'LGBTQRSTUVWXYZ' and brought down the authentication service

  3. Anonymous

    This is the kind of pedantic precision that makes senior engineers simultaneously groan and nod in approval - because we all know that one architect who would absolutely file a PR to change the acronym based on regex semantics, complete with a 47-slide deck explaining why '.*' provides better forward compatibility for future identity expansions than '+' ever could

  4. Anonymous

    Regex truth: + fails the LGBT base case, but * captures the full identity spectrum

  5. Anonymous

    Escape the '+': inclusivity shouldn’t be greedy - otherwise your regex multiplies Qs like scope creep multiplies features

  6. Anonymous

    Marketing wrote LGBTQ+; regex read Q{1,∞}. The validator rejected LGBTQIA - postmortem: inclusivity isn’t a quantifier; ship ^LGBTQ.*$

  7. @Truth_0000 5y

    Regex

  8. Aleksander 5y

    LGBTQ$ Let's stop here.

    1. @Agent1378 5y

      LB is more than enough

      1. @t3alw1re 5y

        meh. 'G' is best.

        1. @Agent1378 5y

          S is the best

          1. @TERASKULL 5y

            S for single😎

            1. @t3alw1re 5y

              oh, my! @AgentLeon4000 really loves himself

              1. @Agent1378 5y

                S for the straight. Or if you prefer there also is A for AMDsexual

                1. @RiedleroD 5y

                  I identify as Archsexual

                2. @prirai 5y

                  Did we forget Nvidiasexual here?

                  1. @feskow 5y

                    novideo

                  2. @t3alw1re 5y

                    I'm ARMsexual, does it count?

                    1. @prirai 5y

                      Yeah, and Ubuntusexual can't be denied.

                  3. @nyxi69 5y

                    intelracial😘

  9. @Tenoooo 5y

    😂🌈🌈

  10. @Dobreposhka 5y

    You should be 100% of gay straightness. Men should love men and women should love men, no gays (and ofc no other sick people), only men lovers

    1. @t3alw1re 5y

      I second to this

  11. @beenotung 5y

    LGTM

  12. @nuntikov 5y

    Oh my god, again someone is trying to parse xml via regex, The best way to find lgbtq elements is to look for attribute suicide-rate being higher than 40%

    1. @RiedleroD 5y

      > higher than 40% jesus christ

    2. @nuntikov 5y

      it's an attempted-suicide-rate, my bad

  13. @Daler_XYZ 5y

    Fuck regex Sorry for fuck

    1. @RiedleroD 5y

      You don't have to be sorry for fuck, I fuck all the time.

    2. @gDanix 5y

      Regex is not the problem!! The problem is the people that parse XML with regex: They don't do it, but they don't know it yet

  14. @feskow 5y

    LGBT[A-Z]*

  15. @fie_n 5y

    fuck it! Rights only!

  16. @L2CacheGay 5y

    LGBT++, formerly known as LGBT With Classes

    1. @feskow 5y

      lmfao

    2. @Nufunello 5y

      I'm dying 😂

    3. @callofvoid0 5y

      🤣🤣🤣

  17. @UshioCheng 5y

    I prefer LGBT.* for more inclusiveness

    1. @sylfn 5y

      * is the best for inclusiveness

Use J and K for navigation