Reply to Re: php and regex (why no =~ like perl)?

Your name:

Reply:


Posted by Mladen Gogala on 11/13/37 11:20

On Sun, 03 Jul 2005 21:08:30 -0700, el_roachmeister wrote:

> Is there a good article that explains why php does not support =~ like
> perl for regex? I am confused by all the different ways one can do
> regex in php but it would seem supporting =~ would eliminate alot of
> redundancy. What am i missing here?

PHP is not Perl. PHP5 has completely different object model, you have the
same kind of syntax for numeric and hash arrays and you have several types
of regex functions which can be categorized into preg functions and the
useless ones. Every other language except Perl (Python, Java, PL/SQL, PHP)
uses functions for regular expressions. Of course, if you've ever read Lex
and Yacc book, you know that =~ is also a function, only disguised as an
operator. Functional syntax is not much harder then the Perl one.

--
http://www.mgogala.com

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация