- Telorand ( @Telorand@reddthat.com ) 12•7 hours ago
Because there’s non-programmers in this community, if you aren’t sure what this means but are too afraid to ask, it’s a Regular Expression that better represents the terms “Linux” and “Unix.”
Though if we’re going to be that pedantic, it would be
[nN][uiI][xX]$
. That extra pipe wouldn’t actually do anything in the last example, because regexp picks one character from the set by default.And if we want to be really pedantic,
(?!nix)[nN][uI][xX]$
Would be the most accurate.
- exu ( @exu@feditown.com ) English1•2 hours ago
*nix
is more likely to be a glob, therefore an accurate version would be*n?x
Edit: global -> glob dang autocorrect
- thingsiplay ( @thingsiplay@beehaw.org ) 6•4 hours ago
Actually
*nix
isn’t a Regular Expression, because the star operator*
requires a preceding character or object to apply to. This is a wildcard for the shell style globbing, where a single star doesn’t require a second object. - bigkahuna1986 ( @bigkahuna1986@lemmy.ml ) 8•6 hours ago
We’re talking about Unix so being as pedantic as possible is actually required.
- ReversalHatchery ( @ReversalHatchery@beehaw.org ) English3•6 hours ago
at that point we could just flip the switch for the case insensitive mode
- Telorand ( @Telorand@reddthat.com ) 4•5 hours ago
But then you’d match terms like “liNuX” and “UniX,” and that’s just silly. 😆