News for hackers. Stuff that matters.
Re:Natural occurring molecule rivals Ozempic in weight loss,... by trehalose on Friday March 07, 2025 @10:13AM (#43290788)
That regex detects things like "eeieiieeeiA __ 1 2 3__" as a proper noun. I'm confused by the decision to accept any number of leading [ei] and any number of trailing (?:\s+[_\d]+).
Re:Natural occurring molecule rivals Ozempic in weight loss,... by jcl on Friday March 07, 2025 @10:49AM (#43291124)
It only looks for a single leading “e” or “i”, not any number. I’m guessing those tweaks were added to capture specific proper nouns that weren’t captured by simpler “leading capital letter” regexes, like “iPad” or “eBay”.
Re:Natural occurring molecule rivals Ozempic in weight loss,... by Izkata on Friday March 07, 2025 @03:34PM (#43294288)
"*" is "0 or more" and "+" is "1 or more", it looks for any number of "e" or "i" at the beginning and at least one capital letter. The diagram below the regex is wrong.

Instead of

  [ie]*-?[A-Z]+
it looks like they wanted

  [ie]?-?[A-Z]
Re:Natural occurring molecule rivals Ozempic in weight loss,... by genewitch on Saturday March 08, 2025 @02:11AM (#43298201)
There was a product called the eeePC or so. It was a "netbook."
Re:Natural occurring molecule rivals Ozempic in weight loss,... by card_zero on Saturday March 08, 2025 @02:22AM (#43298257)
The Asus product line, yes (all three Es apparently stand for "easy"). But Asus write it with a capital E on the front. Still, somebody else might not.
Re:Natural occurring molecule rivals Ozempic in weight loss,... by dleeftink on Friday March 07, 2025 @10:15AM (#43290801)
It's not perfect for sure, but perfectly suitable for a first pass and then a dictionary sweep or another set of regexes. I guess I like the compactness of it!