Why are String Formatted Queries Considered So Magical?

Roy Smith roy at panix.com
Thu Jul 1 08:11:03 EDT 2010


Stephen Hansen <me+list/python at ixokai.io> wrote:

> The quote does not deny the power of regular expressions; it challenges 
> widely held assumption and belief that comes from *somewhere* that they 
> are the best way to approach any problem that is text related.

Well, that assumption comes from historical unix usage where traditional 
tools like awk, sed, ed, and grep, made heavy use of regex, and 
therefore people learned to become proficient at them and use them all 
the time.  Somewhat later, the next generation of tools such as vi and 
perl continued that tradition.  Given the tools that were available at 
the time, regex was indeed likely to be the best tool available for most 
text-related problems.

Keep in mind that in the early days, people were working on hard-copy 
terminals [[http://en.wikipedia.org/wiki/ASR-33]] so economy of 
expression was a significant selling point for regexes.

Not trying to further this somewhat silly debate, just adding a bit of 
historical viewpoint to answer the implicit question you ask as to where 
the assumption came from.



More information about the Python-list mailing list