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
-
It's not that hard once you get used to it. Like learning a new set of alphabets and throwing them together.
Though if you're getting used to regex in your apps, you have bigger problems -
aritzh7527yThey are not that hard, once you get used to them. I mostly use the subset without look ahead/behind, and I have to look up the syntax for those when I need them, but the rest is actually not that hard.
-
"Normal" regex is not that hard...
I do have to search for syntax when it comes to group constructs such as branch resets, conditional lookarounds or recursive relative subpatterns.
One problem with regex is that people try to use it to gain 100% certainty on complex fuzzy questions (like HTML validation).
The other problem is that our brains are not used to such non-descriptive "keywords", so it often looks cryptic as soon as it's longer than 20 characters.
One good trick is to write longer regexes nicely formatted, with indentation... I mean, you wouldn't consider a minified JS file to be a human-workable piece of code either. You can even use (#comments) to clarify. -
aritzh7527y@Sumafu you use regex as the parser, or use regex as the lexer, that helps a parser? Because if it is the former, HTML is not a regular language, so it cannot be parsed by a regex
-
Sumafu22427y@aritzh In fact, I use regex as the parser 😂 But I parse just a part of the same website 😉
-
blem1410636y
-
devios157016yOh I can write them no problem. It’s figuring out what they mean again two months later that’s the hard part. 🤣
My brain hurts just from thinking that i need to write regex
joke/meme