|
Posted by Chung Leong on 08/10/06 15:13
Carl Vondrick wrote:
> Regular expressions are useful -- I'll give you that -- but I think it's
> a little much to say that they are the _most_ useful. Their only
> practical use is in highly specialized things, such as validating an
> email or writing a parsing engine. My day-to-day use of regex is very
> limited and I consider myself a power-user. In email validation regular
> expressions make sense, but in testing if something is an integer --
> that's going a little overboard.
I think you're unduly limiting your use of regexp. Take the present
example. Is it that specialized to find a list of items matching a
particular pattern? Operations involving text strings occurs in many
places in a typical web-app. Regexp not only let you do it quickly, it
let you do it so with good tolerance for deviations. And as the pcre
functions are binary-safe, you can use them on binary data as well. The
ability to do byte-pattern matching is incredibly useful.
Navigation:
[Reply to this message]
|