Lemmy.World
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
irradiated@radiation.partyBannedBM to TechNews@radiation.party · 3 years ago

[HN] A regular expression to check for prime numbers

www.noulakaz.net

external-link
message-square
2
link
fedilink
6
external-link

[HN] A regular expression to check for prime numbers

www.noulakaz.net

irradiated@radiation.partyBannedBM to TechNews@radiation.party · 3 years ago
message-square
2
link
fedilink
A regular expression to check for prime numbers
www.noulakaz.net
external-link

[ comments | sourced from HackerNews ]

alert-triangle
You must log in or register to comment.
  • withersailor@aussie.zone
    link
    fedilink
    arrow-up
    2
    ·
    3 years ago

    /1?$|(11+?)\1+$/

    That’s tricky! Neat though!

  • lemmyng@beehaw.org
    link
    fedilink
    arrow-up
    1
    ·
    3 years ago

    Clever! Inefficient (since it’s essentially a brute force), but very clever and probably worth a code golf award.

TechNews@radiation.party

technews@radiation.party

Subscribe from Remote Instance

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: [email protected]
lock
Community locked: only moderators can create posts. You can still comment on posts.

Aggregated tech news.

Visibility: Public
globe

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

  • 1 user / day
  • 1 user / week
  • 1 user / month
  • 1 user / 6 months
  • 1.74K local subscribers
  • 4.4K subscribers
  • 4.47K Posts
  • 969 Comments
  • Modlog
  • mods:
  • andrew@radiation.party
  • irradiated@radiation.partyBannedB
  • UI: 0.19.20-5-ga406e80b
  • BE: 0.19.19-9-gc55dd700c
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org