> “Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems.”

Funny! And this is quite a thread I'm skimming over. I'm not totally sure if it's about old programmers who won't/can't change, or regular expressions. But I'll add my 2 cents:

Sometimes when scripting I'll search google for help with whatever comparison I'm trying to do, and every once in a while the solution involves a regular expression. I'll copy/paste/test and if it works I'm done. It's not that I won't/can't understand regular expressions, it's just that I really have no need to learn the details when I can easily find what I need posted by someone else with a similar issue.

P.S. I've heard that you can tell if someone is really old if they type two spaces after a period.

On 2/27/2020 8:25 AM, Pew, Curtis G wrote:
On Feb 27, 2020, at 10:13 AM, Seymour J Metz <[email protected]> wrote:

Don't confuse logic with habit; there is nothing illogical about regexen. Yes, 
the syntax is clumsy and not nearly as readable as patterns in, e.g., SNOBOL, 
but there's nothing magic about them, I could teach a bright elementary school 
student to write simple regexen, although probably not to read and write some 
of the more complicated ones I have dealt with.

Now, not all change is progress, and if you were ranting against, e.g., C, I 
might agree, but regexen do have redeeming social value.


It feels like we’re overdue for someone to reference the (in)famous quote on 
regular expressions:

“Some people, when confronted with a problem, think "I know, I'll use regular 
expressions." Now they have two problems.”

https://blog.codinghorror.com/regular-expressions-now-you-have-two-problems/

Often when I use regular expressions I get the feeling there’s a more elegant 
solution trying to escape in there somewhere, but I haven’t been able to come 
up with it yet. I suppose I should google SNOBOL; I’ve heard of it but never 
really investigated it.



----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to