I said this on Twitter but for me the thing that trips me up is constantly having to translate in my head between the thing I want to do in a regular expression and the specific regex syntax I need to accomplish it. The regex mental model is actually quite simple but the syntax is a nightmare.
I graduated in 1990 in Electrical Engineering and since then I have been in university, doing research in the field of DSP. To me programming is more a tool than a job.
I agree. I actually like regular expressions, I find that they are a very powerful tool. However, the syntax leaves somehow to desire... It is not too bad for simple stuff (e.g., regexp for identifiers, especially with POSIX extension), but when the regexp gets complex (e.g., regexp for floating point numbers...) they look like a cat walking on the keyboard.
I tried to search for a different syntax, compact as the existing, but more readable but with no result. In the end I wrote myself a "regexp building" library that proves useful for the most complex cases.
I said this on Twitter but for me the thing that trips me up is constantly having to translate in my head between the thing I want to do in a regular expression and the specific regex syntax I need to accomplish it. The regex mental model is actually quite simple but the syntax is a nightmare.
I agree. I actually like regular expressions, I find that they are a very powerful tool. However, the syntax leaves somehow to desire... It is not too bad for simple stuff (e.g., regexp for identifiers, especially with POSIX extension), but when the regexp gets complex (e.g., regexp for floating point numbers...) they look like a cat walking on the keyboard.
I tried to search for a different syntax, compact as the existing, but more readable but with no result. In the end I wrote myself a "regexp building" library that proves useful for the most complex cases.
This is awesome, thank you for sharing!