Re: The difference between ereg and preg?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2006-08-04 at 13:03 -0400, John Nichel wrote:
>
> Perl compatible regexs are faster* and more powerful.  Course, writing a 
> good Perl regex is an art form in itself (probably why O'Reilly released 
> a book just on regexs), and takes some time (and headaches) to master 
> (if one ever does master it).
> 
> The difference in the people who use one or the other?  Probably nothing 
> more than their background.  Those of us who worked with Perl before php 
> are more than likely gravitate towards preg.  Those who didn't, or had 
> little Perl regex experience more than likely went to the POSIX (ereg) 
> style as it's a bit easier to pick up.
> 
> *I'm sure there are some out there who will dispute this.

I use POSIX primarily because it was a standard and because PCRE was not
originally enabled by default. Seems funny that the POSIX version is
being deprecated *heh*.

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux