54
submitted 1 month ago by allywilson@lemmy.ml to c/linux@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] fhein@lemmy.world 13 points 1 month ago

Isn't (I|U) equivalent to ([IU])?

[-] Telorand@reddthat.com 7 points 1 month ago

Yes, but you can really only do that with single characters, since your first example is an ordered group and the second is an unordered set in a capturing group. The equivalency drops off when you include more characters.

Plus, you can do things like [a-zA-Z], and you can't do that with the former example.

I would imagine there's a difference in computing overhead, too, but I have no idea which is more performant.

this post was submitted on 05 Oct 2024
54 points (76.5% liked)

Linux

48199 readers
1269 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS