217
woops
6y

My brain hurts just from thinking that i need to write regex

Comments
  • 23
    I can *read* them.

    Bow before me.
  • 9
    It's not that hard once you get used to it. Like learning a new set of alphabets and throwing them together.

    Though if you're getting used to regex in your apps, you have bigger problems
  • 1
    "/g(*.)" that's all I can write :\
  • 4
    I think that I am the regex guy in the meme 😂
  • 4
    I like regex...
  • 4
    They are not that hard, once you get used to them. I mostly use the subset without look ahead/behind, and I have to look up the syntax for those when I need them, but the rest is actually not that hard.
  • 1
    So jealous!
  • 0
    Fuck that ... just work with abstractions :P.
  • 4
    "Normal" regex is not that hard...

    I do have to search for syntax when it comes to group constructs such as branch resets, conditional lookarounds or recursive relative subpatterns.

    One problem with regex is that people try to use it to gain 100% certainty on complex fuzzy questions (like HTML validation).

    The other problem is that our brains are not used to such non-descriptive "keywords", so it often looks cryptic as soon as it's longer than 20 characters.

    One good trick is to write longer regexes nicely formatted, with indentation... I mean, you wouldn't consider a minified JS file to be a human-workable piece of code either. You can even use (#comments) to clarify.
  • 2
    @maybeken shouldn't it be (.*)?
  • 0
    @ethernetzero I would bow if you could parse HTML with them. ;-)
  • 0
    @Fast-Nop Then bow down! I have a HTML parser which parses with regex
  • 0
    @Sumafu you use regex as the parser, or use regex as the lexer, that helps a parser? Because if it is the former, HTML is not a regular language, so it cannot be parsed by a regex
  • 0
    @aritzh In fact, I use regex as the parser 😂 But I parse just a part of the same website 😉
  • 1
    @Sumafu *bow* even Jon Skeet can't do that.
  • 0
    Had to implement a parser once, I can regex pretty much everything now.

    Great analogy @hashedram.
  • 2
    Oh I can write them no problem. It’s figuring out what they mean again two months later that’s the hard part. 🤣
Add Comment