DEV Community

Discussion on: What languages and tools do you use that spark joy?

Collapse
 
madza profile image
Madza • Edited

Regex.

-Said no one ever :)

Collapse
 
rrampage profile image
Raunak Ramakrishnan • Edited

I'll be that person :P ... I love regexes. Tools like grep, sed, awk become power-tools when using regexes allowing you to slice and dice log files easily. They do have a learning curve, but once you have learned them, they are the most reliable tool, having a decent library in most programming language. I think regexes are a great example of abstract computer science (finite state automata) concepts being useful in practice.

Collapse
 
robole profile image
Rob OLeary • Edited

I wouldn't rate regex as joyful, but I like it. I dont feel the dread that some people have for regex! For some tasks, it is great, and packs a lot of punch. I think a lot of DSLs have a similar effect on people.

I wrote a post recently about calculating the reading time of a post, and regex shrinks the code dramatically, no need to do any parsing of html.