4 ms·
I agree with you. I got tired of fighting with regex where I got to the point of simply not using it if at all possible. A comment further up offered a very pr
by RobertRoberts 4y ago
I agree with you. I got tired of fighting with regex where I got to the point of simply not using it if at all possible.
A comment further up offered a very promising alternative.
https://github.com/VerbalExpressions/JSVerbalExpressions#testing-if-we-have-a-valid-url https://github.com/VerbalExpressions/JSVerbalExpressions#tes...
It's a bit verbose, but I don't care anymore, I am too much a veteran to care about my code being sleek, I want it readable and workable.
- maweki 4y agoI very much think that's a great approach. Though the outside language kinda needs to be static as well for this to be really useful. For SQL I'm impressed with Jooq on Java. The DSL created, barring some shenanigans, doesn't allow you to create a malformed SQL statement that also makes the Java code compile and vice versa. For me, that's the goal.