Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
31415097yThere are two kinds of people in the anti-regex camp:
1. The people who don't understand them, because they lack fundamental CS knowledge.
2. The people who witnessed some of the horrors that where created back when Perl was still commonplace. -
CptFox16207yAs useful as they are, they are quite hard to read and debug. But tools like regex101.com are starting to make it much easier
-
31415097y@Alt-Grrr Look at Perl6's Named Regex concept. That is the solution. It allows you to create a regex, give it a name and then reference it in another, more complex regex. It basically enables arbitrarily complex regular expressions while still maintaining readability.
You can even use that system to create whole grammars that can then be used to parse text with a single method call. -
@3141 I tend to do this in TCL, just set a variable to a sub regex, e.g. to match a hex character
-
They are like a very hot and sharp knife. You have to make so that it matches your use case exactly otherwise a waste of processing power.
-
Regex is a powerful, but unfortunately unintuitive tool (see also Git, CSS). This means that people who are forced to work with or learn it often dislike it at first. On the plus side, once you get a complicated Regex to work, you feel like a God
-
RegexFun1227yI love regex, they can help you so much and not only in coding, also with any ide, when you need to find replace a lot of changes.
Related Rants
Never understood the hate for regular expressions, it's just one more useful tool in my eyes. Anyone want to weigh in?
undefined
regex