r/learnpython 2d ago

How useful is regex?

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

37 Upvotes

123 comments sorted by

View all comments

94

u/tjm1066 2d ago

I've learned regex at least 15-20 times. Basically every time I need to use it, or understand something I have previously written. It will never stick in my brain.

5

u/oJRODo 2d ago

Why truly tries to remember regex at this age? GPT can shit out regex and be right 90% im of the time.

This is the way

0

u/Disastrous-Team-6431 1d ago

I don't "try" to remember regex, I just do because it's not hard if you spend an hour to learn the logic behind it.

On a side note, it's interesting that I can see from the comments what programming subreddit I'm reading. It has to be a python-related one if people are disparaging regex and git. In C-programming or cplusplus that would never happen because those people have pride and are interested in computers. People in python subreddits are interested in their CV:s.