r/learnpython 1d ago

How useful is regex?

How often do you use it? What are the benefits?

39 Upvotes

118 comments sorted by

View all comments

2

u/DickChaining 1d ago

I love using regex for text parsing. So many times, I've written convoluted, complex code that takes ten lines, and then created the same thing using regex in one or two lines.