The Bard's Lemmy
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
cm0002@lemmy.world to Programmer Humor@programming.dev · 1 year ago

Like programming in bash

lemmy.ml

message-square
130
link
fedilink
1.3K

Like programming in bash

lemmy.ml

cm0002@lemmy.world to Programmer Humor@programming.dev · 1 year ago
message-square
130
link
fedilink
  • conditional_soup@lemm.ee
    link
    fedilink
    arrow-up
    91
    arrow-down
    7
    ·
    edit-2
    1 year ago

    Regex

    Edit: to everyone who responded, I use regex infrequently enough that the knowledge never really crystalizes. By the time I need it for this one thing again, I haven’t touched it in like a year.

    • 9point6@lemmy.world
      link
      fedilink
      arrow-up
      33
      ·
      1 year ago

      You get used to it, I don’t even see the code—I just see: group… pattern… read-ahead…

    • kameecoding@lemmy.world
      link
      fedilink
      arrow-up
      25
      arrow-down
      1
      ·
      1 year ago

      Most of regex is pretty basic and easy to learn, it’s the look ahead and look behind that are the killers imo

      • PoolloverNathan@programming.dev
        link
        fedilink
        English
        arrow-up
        11
        ·
        1 year ago

        (?=) for positive lookahead and (?!) for negative lookahead. Stick a < in the middle for lookbehind.

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

      You always forget regex syntax?

      I’ve always found it simple to understand and remember. Even over many years and decades, I’ve never had issues reading or writing simple regex syntax (excluding the flags and shorthands) even after long regex breaks.

    • _stranger_@lemmy.world
      link
      fedilink
      arrow-up
      8
      ·
      1 year ago

      https://regex101.com/

      Don’t let the gatekeepers keep you out. This site helps.

      • activ8r@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        Nice! This is the one I use: https://regexr.com/
        Though it appears to be very similar on the face of it.

    • FundMECFS@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      This is one of the best uses for LLM’s imo. They do all my regex for me.

    • PlexSheep@infosec.pub
      link
      fedilink
      arrow-up
      5
      arrow-down
      2
      ·
      1 year ago

      No. Learn it properly once and you’re good. Also it’s super handy in vim.

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

        interns gonna intern

    • LeninOnAPrayer@lemm.ee
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      I just use the regex101 site. I don’t need anything too complicated ever. Has all the common syntax and shows matches as you type. Supports the different languages and globals.

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

      For me I spent one hour of ADHD hyper focusing to get the gist of regex. Python.org has good documentation. It’s been like 2 years so I’ve forgotten it too lol.

Programmer Humor@programming.dev

programmer_humor@programming.dev

Subscribe from Remote Instance

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: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 477 users / day
  • 1.14K users / week
  • 4.49K users / month
  • 9.3K users / 6 months
  • 1 local subscriber
  • 31.8K subscribers
  • 1.67K Posts
  • 29.8K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.14
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org