From: Nikolai Weibull Date: 2004-11-18T23:04:46+09:00 Subject: Re: About Regular Expressions * Robert Klemme [Nov 18, 2004 14:10]: > > > In principle this applies for all kind of questions and > > > complaints. Maybe it's just a sign that regular expressions are > > > not easy to grasp for people without CS background. > > Perhaps, but it's sad that no one can for their life consider the fact > > that maybe they've done something wrong themselves, not the writers of > > the software/programming language they are using. > Well, yes, but it's not true that "no one" considers the option of his own > failure. That's dramatically exaggerated IMHO, although I readily concede > that it's a general human tendency. Sure, it's an exaggeration, but as a teacher's assistant at school I've come to realize that CS students are exceedingly lazy and prone to blame others for their own mistakes. Listen, I'm not saying that people act in this manner all the time, but I noticed that there have been quite a few posts of this kind and I figured that this was a result of some lack of proper documentation or some such. I'm not here to place blame, nor to bitch about people asking "stupid" questions (I simply delete and ignore those threads if I don't feel like answering them). My goal was to solve the problem once and for all instead of someone having to do it once a week when one of these questions comes up on the list. > > > > I am not suggesting that these question stop entirely, but I > > > > request that they be well thought out before. Still, there > > > > seems to be a need for a FAQ or similar, covering regular > > > > expression basics and common pitfalls - perhaps even including > > > > common idioms and uses in Ruby. > > > > > Like http://www.rubygarden.org/ruby?RegexpCookbook ? > > > > Hardly. That page is for writing regular expressions that match > > some specific data, not a discussion about how to write and use > > regular expressions in the large. Still, a wiki page would work > > fine. > In *that* case a book like "Mastering Regular Expressions" might be far > more appropriate as the matter is quite complex. See here for example: > http://www.oreilly.com/catalog/regex/index.html Yes, it's a good book, but it's short on Ruby specifics and not everyone wants to buy a book to use regular expressions properly. Thus, some kind of _good_ introduction to regular expressions and their use in Ruby is still desirable. nikolai -- ::: name: Nikolai Weibull :: aliases: pcp / lone-star / aka ::: ::: born: Chicago, IL USA :: loc atm: Gothenburg, Sweden ::: ::: page: www.pcppopper.org :: fun atm: gf,lps,ruby,lisp,war3 ::: main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}