The Enchanted Tavern
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
☆ Yσɠƚԋσʂ ☆ to Programmer Humor@lemmy.mlEnglish • 1 year ago

How to regex

lemmy.ml

message-square
90
fedilink
258

How to regex

lemmy.ml

☆ Yσɠƚԋσʂ ☆ to Programmer Humor@lemmy.mlEnglish • 1 year ago
message-square
90
fedilink
alert-triangle
You must log in or register to comment.
  • @CCF_100@sh.itjust.works
    link
    fedilink
    English
    1•
    edit-2
    1 year ago

    Hey ChatGPT, here’s an example string, how would you get this string out of it with <insert regex implementation>?

  • @ThuleanPerspective@eviltoast.org
    link
    fedilink
    English
    1•
    edit-2
    1 year ago

    removed by mod

  • @ThuleanPerspective@eviltoast.org
    link
    fedilink
    English
    1•
    edit-2
    1 year ago

    removed by mod

  • @ThuleanPerspective@eviltoast.org
    link
    fedilink
    English
    1•
    edit-2
    1 year ago

    removed by mod

  • @ThuleanPerspective@eviltoast.org
    link
    fedilink
    English
    1•
    edit-2
    1 year ago

    removed by mod

  • @ThuleanPerspective@eviltoast.org
    link
    fedilink
    English
    1•
    edit-2
    1 year ago

    removed by mod

  • @ThuleanPerspective@eviltoast.org
    link
    fedilink
    English
    0•
    edit-2
    1 year ago

    removed by mod

  • @ThuleanPerspective@eviltoast.org
    link
    fedilink
    English
    0•
    edit-2
    1 year ago

    removed by mod

  • @ThuleanPerspective@eviltoast.org
    link
    fedilink
    English
    0•
    edit-2
    1 year ago

    removed by mod

  • @ThuleanPerspective@eviltoast.org
    link
    fedilink
    English
    0•
    edit-2
    1 year ago

    removed by mod

  • @ThuleanPerspective@eviltoast.org
    link
    fedilink
    English
    0•
    edit-2
    1 year ago

    removed by mod

  • @ThuleanPerspective@eviltoast.org
    link
    fedilink
    English
    0•
    edit-2
    1 year ago

    removed by mod

  • @ThuleanPerspective@eviltoast.org
    link
    fedilink
    English
    -1•
    edit-2
    1 year ago

    removed by mod

  • @ThuleanPerspective@eviltoast.org
    link
    fedilink
    English
    -1•
    edit-2
    1 year ago

    removed by mod

  • stewie410
    link
    fedilink
    3•1 year ago

    I don’t know all of the regex rules (look ahead/behind, etc); but it’s honestly not that bad. If you can learn the syntax for a programming language, you can learn the basics of regex…

    • ☆ Yσɠƚԋσʂ ☆OP
      link
      fedilink
      -1•1 year ago

      Sure, learning basics of regex is not that hard, but complex regex expressions can easily become impenetrable. I actually like the verbal expressions idea where you write out the regex using a long form and that gets compiled into the actual regex, e.g:

      const tester = VerEx()
          .startOfLine()
          .then('http')
          .maybe('s')
          .then('://')
          .maybe('www.')
          .anythingBut(' ')
          .endOfLine();
      

      That seems like the best of both world approach to me.

      • stewie410
        link
        fedilink
        2•1 year ago

        My brief experience with LINQ has also taught me to prefer this type of thing as well; though I still use regex on a daily basis most of the time, given my environment.

Programmer Humor@lemmy.ml

!programmerhumor@lemmy.ml
Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmerhumor@lemmy.ml

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
  • 8 users / day
  • 88 users / week
  • 378 users / month
  • 1.53K users / 6 months
  • 1 subscriber
  • 1.66K Posts
  • 30.5K Comments
  • Modlog
  • mods:
  • @AgreeableLandscape@lemmy.ml
  • @cat_programmer@lemmy.ml
  • UI: unknown version
  • BE: 0.18.2
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org