this post was submitted on 12 Nov 2023
229 points (95.3% liked)

Programmer Humor

32371 readers
425 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 

you are viewing a single comment's thread
view the rest of the comments
[–] backhdlp@lemmy.blahaj.zone 36 points 11 months ago (51 children)

I still don't understand regex at all

[–] FUsername@feddit.de 24 points 11 months ago (6 children)

My guess is, that someone started with a small share of features to find a simple solution for the problem, but the complexity of the problem got waaaay out of hand.

[–] loafty_loafey@lemmy.world 13 points 11 months ago

Regex is actually just a way to write (Epsilon) non determistic state automata(ε-NDA) using text! ε-NDA comes from automata theory and they are just a somewhat powerful way to describe state machines! They can kind of be seen as a stepping stone to things like Context-Free Grammars which is what language parsers use to define their language/parsers, and Turing machines! Regex is a fundamental part of computer science, and they are of course incredibly useful in string validation due to their expressive power! If you study at uni and get the chance to take a course in automata theory I recommend it! Personal favorite subject :)

load more comments (5 replies)
load more comments (49 replies)