• Pleonasm@programming.dev
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    1 year ago

    Who is this for? People who write lots of regular expressions won’t need it because they know what they’re doing and people who don’t write lots of regular expressions probably won’t find it anyway.

    It just seems like a weird type of user who actually wants this.

    • realitista@lemm.ee
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      1 year ago

      I almost never use regex, but when I do, I’d love something like this. Exactly because I don’t use regex enough to be bothered learning it’s impenetrable syntax.

      • custom_situation@lemm.ee
        link
        fedilink
        English
        arrow-up
        0
        ·
        edit-2
        1 year ago

        i mean, you can learn the basics of matching in 30 minutes or less. that core knowledge will be broadly applicable across any tool that uses regex. things get much easier once to have a handle on the basics.

        …or you can learn this regex dsl and still have to learn regex. the difference is you’re learning a non-portable regex syntax.

        • IronDonkey@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 year ago

          You’re right, I can learn the basics of regex in 30 minutes. Then I can write my one regex. Then I can forget the basics of regex in 3 minutes, because regex’s syntax is random garbage that makes no intuitive sense, and I hate and suck at memorizing nonsense. Repeat every 4-16 months.

          It’s true though that regex is entrenched enough that even if something is easier to read, it’s unlikely that it’ll replace regex any time soon. You’d need a couple big names to adopt it, then many years.

          But if there’s a readable replacement that can convert to and from regex - well, screw it, I’m in. Even if I’m required to use regex in some program, if I can write something that makes sense without the requisite half hour of googling crap, I’ll just use it as a separate tool to make and read regex strings.

      • NightAuthor@beehaw.org
        link
        fedilink
        English
        arrow-up
        0
        ·
        1 year ago

        I learned enough to see how powerful it was, then started using it within Sublime Text to edit data from time to time. (Extract URLs or something from a websites code, reformat X or Y data for a script I’m hacking together) and I’ve slowly retained more and more of the elements I repeatedly use. I think I’ve actually got a pretty good grasp on it. Maybe you should be using it more.

        • Kempeth@feddit.de
          link
          fedilink
          English
          arrow-up
          0
          arrow-down
          1
          ·
          1 year ago

          When you want to get better using a hammer, just treat everything as a nail.

    • minorninth@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      OK, let’s say you’ve got a bunch of regexes in a source repository that need to get modified frequently. It can be difficult to code-review complex regexes, and even harder to code-review changes to an existing regex.

      Something like this might actually help. A change to a complex regex might actually produce a more clear diff of a subset of lines.

      Also, I think being able to comment in the middle of a regex would be super handy for that type of code.