86thumbs
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
VegOwOtenks@lemmy.world to Programmer Humor@lemmy.mlEnglish · 2 years ago

Regex flavors

lemmy.world

message-square
32
fedilink
395

Regex flavors

lemmy.world

VegOwOtenks@lemmy.world to Programmer Humor@lemmy.mlEnglish · 2 years ago
message-square
32
fedilink
  • VegOwOtenks@lemmy.worldOP
    link
    fedilink
    arrow-up
    24
    ·
    2 years ago

    You can use backreferences \1 \2 etc. but you can also give them names explicitly.
    it looks like this: (?<name>inner-regex)
    Some flavors support it, kotlins doesn’t apparently.

    • jaybone@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      2 years ago

      TIL thanks!

Programmer Humor@lemmy.ml

programmerhumor@lemmy.ml

remote_follow_modal_title

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.
community_visibility: public
globe

public_blurb

  • 40 users / day
  • 336 users / week
  • 2.05K users / month
  • 6.88K users / 6 months
  • number_of_local_subscribers
  • 40K subscribers
  • 1.94K Posts
  • 40K Comments
  • Modlog
  • mods:
  • AgreeableLandscape@lemmy.ml
  • cat_programmer@lemmy.ml
  • UI: unknown version
  • BE: 0.19.5
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org