@[email protected] to [email protected]English • 1 year agoRule.htmllemmy.mlimagemessage-square19fedilinkarrow-up1285arrow-down14
arrow-up1281arrow-down1imageRule.htmllemmy.ml@[email protected] to [email protected]English • 1 year agomessage-square19fedilink
minus-square@[email protected]linkfedilink9•1 year ago/^[a-zA-Z_]\w*$/ i think… most languages at least
minus-square@[email protected]linkfedilink3•1 year agoThat’s variables and keyword. If you have a regex for a languages keywords you can substract as they are closed under that operation.
minus-square@[email protected]linkfedilink2•1 year agogood point. some languages (like rust) also support r# prefix to use a keyword as a variable also
oh yeah? declare a variable.
oh you know how to code? name every variable
/^[a-zA-Z_]\w*$/
i think… most languages at least
That’s variables and keyword.
If you have a regex for a languages keywords you can substract as they are closed under that operation.
good point. some languages (like rust) also support
r#
prefix to use a keyword as a variable also