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
-
I understand my friend. There are places on the internet for pre defined regex for all the common patterns. Check that out
-
Voxera113887yRegex is good for small matches but once its starts to grow you probably should split it (if the language permits is) into parts that you name to make it easier to understand and if that is not possible, add a lengthy comment detailing what it does.
Listing every part with what it does makes it easier to spot that kind of errors but its still hard :/ -
hexc11197yI felt this way about regex before I took the time to understand it. Now I use it all over and love it's convenience!
-
I don't understand the hate for regex? It's great and powerful thing. Imagine validating form inputs without it.
-
571n93r737y@arcadesdude i always go to regex101 to create/mod my regex just to make sure my sanity is intact
-
You're right, I much prefer the concise readability of 15 nested if statements to check if an email is valid.
-
571n93r737y@Alkotronikk i used a double regex last week for highlighting search results. First to add \s* between each character but not beginning or end and second to find all instances of the patten in a term 😁 sounds super complicated but worked out very elegant
-
Regex is great! I saved myself and other hundreds of hours with the help of it.
Related Rants
Fuck regex and everyone who has ever endorsed the use of and/or is affiliated with regex.
It's unreadable, impractical, overly complex and complicated and it adds unnecessary clutter to your code, and your thought process.
It's 00:50 am and I just spent 3 hours debugging a regex only to realise forgot a single "?" in a 75+ character long string and I want to go to bed.
rant
regex