302
Rule.html (lemmy.ml)
submitted 10 months ago by nobloat@lemmy.ml to c/196@lemmy.blahaj.zone
you are viewing a single comment's thread
view the rest of the comments
[-] lseif@sopuli.xyz 9 points 10 months ago

oh yeah? declare a variable.

[-] bfg9k@lemmy.world 8 points 10 months ago

oh you know how to code? name every variable

[-] lseif@sopuli.xyz 9 points 10 months ago

/^[a-zA-Z_]\w*$/

i think... most languages at least

[-] anton@lemmy.blahaj.zone 3 points 10 months ago

That's variables and keyword.

If you have a regex for a languages keywords you can substract as they are closed under that operation.

[-] lseif@sopuli.xyz 2 points 10 months ago

good point. some languages (like rust) also support r# prefix to use a keyword as a variable also

this post was submitted on 24 Nov 2023
302 points (100.0% liked)

196

16282 readers
2216 users here now

Be sure to follow the rule before you head out.

Rule: You must post before you leave.

^other^ ^rules^

founded 1 year ago
MODERATORS