Reply to Re: PHP equivalent to Perl's !~

Your name:

Reply:


Posted by The Natural Philosopher on 01/19/08 16:08

Toby A Inkster wrote:
> Michael Fesser wrote:
>> .oO(wes.waters@gmail.com)
>>
>>> I haven't seen any documentation on this, and searching for !~ has been
>>> fruitless. Any suggestions, or is there no equivalent?
>> What about !preg_match()?
>> Just a guess, since I don't use Perl.
>
> Yep, that's correct.
>
> Perl:
>
> if ($foo !~ /bar/)
> {
> print "match\n";
> }
>
> PHP:
>
> if (!preg_match('/bar/', $foo))
> {
> print "match\n";
> }
>
>
And apart from reminding me of 'pregnancy' how much more readable the
PHP is!

[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

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