|
Posted by Jerry Stuckle on 08/11/06 00:21
Chung Leong wrote:
> 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.
>
Chung,
Sorry, I have to agree with others. While I also think regex's are
important, I can think of a lot of other things which are more important.
For instance, I could argue that you aren't an expert until you
understand PHP5's classes and objects. I think a good OO structure is
more important than understand regex's.
Or I could argue that you aren't an expert until you thoroughly
understand the database interface (i.e. MySQL or PostGres) because most
applications are very dependent on databases.
Or any of a number of things.
Yes, regex's are important - but they're also specialized. Not every
program needs them, and in some cases there are better ways.
I've written a lot of code and never had a need for regex's. And I've
written code which uses regex's. But I think a higher percentage of my
code uses mysql or classes than regex's.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|