this post was submitted on 01 Feb 2024
315 points (98.5% liked)
Comics
453 readers
1 users here now
A community for sharing comics related to programming
Icon base by Delapouite under CC BY 3.0 with modifications to add a gradient
founded 10 months ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
No. Never saw the need.
Regex is fast and useful though. It's a tool in your toolbox that make certain situations extremely easy as the comic depicts.
Sure. I'm just saying it was never worth the effort to learn it for me.
I guess I'm just not sure what your doing in Python that is equivalent in some way to regex without using the
re
library. Like, do you mean you're using loopedif
s and raw strings to do something similar?Learning basic regex takes less than a day. Learning extended regex takes a day or two.
If you're often writing Python scripts to scan strings and match patterns, I can almost guarantee you're actually wasting more of your time avoiding having to use regex.
In fact, if you're working with large datasets, you're wasting even more time waiting for your scripts to finish. Python's regular expression engine is written in C, which is considerably faster than plain Python.