• 0 Posts
  • 41 Comments
Joined 1 year ago
cake
Cake day: July 3rd, 2023

help-circle

  • Assuming “text” in your example is a placeholder for a 5 digit alpha string, it can be written like this in regex: /[a-zA-Z0-9]{5}/

    If ”text" is literal, then your statement is impossible.

    I think that when it gets to more complex expressions like a phone number with country code that accepts different formats, the verbosity of a higher level language will be more confusing, or at least more difficult to take in quickly.


  • How do you think that would look? Regex isn’t particularly complicated, just a bit to remember. I’m trying to picture how you would represent a regex expression in a higher level language. I think one of its biggest benefits is the ability to shove so much information into a random looking string. I suppose you could write functions like, startswith, endswith, alpha(4), or something like that, but in the end, is that better?






  • As an American, I don’t know that I really see this too much. For Halloween, it’s not uncommon for some houses to give those little shooters to parents. Obviously it’s not good to get sloshed at a kid’s birthday party, but I don’t think too many people put too much weight on a drink or too. Either that, or I don’t put much weight on it, because I’ll have a social beer at noon on a weekday if it feels right.







  • If I have a mixed bucket of LEGO bricks and dump it in a pile, do I have a pile of LEGO or LEGOs? The fact that LEGO is plural was revealed to me within the last week, but I don’t know if it’s the same when talking about the individual parts vs ten packs of LEGO. It doesn’t feel right to say that the pile is a pile of 100 LEGO.