You are here: Re: Ereg « All PHP « IT news, forums, messages
Re: Ereg

Posted by Ray Paseur on 11/24/05 15:05

strpos will probably be faster than ereg. It's the easier solution if you
know the exact content of the substring you're looking for. But if you only
know the general pattern of the substring, then you need to fall back on
ereg or eregi. Google "REGEX" and you'll find some helpful resources for
dealing with regular expressions. ~Ray

"Oli Filth" <catch@olifilth.co.uk> wrote in message
news:1132759946.099296.177290@f14g2000cwb.googlegroups.com...
>
> Harry wrote:
>> > strpos()
>>
>> I've been flicking through the documentation ad it seems that strpos()
>> only tells you if a string contains an only CHARACTER. Am I right?? :S
>>
>
>>From the manual:
> "strpos -- Find position of first occurrence of a string"
>
> strpos("hendogpenguin", "dog")
>
> will return 3.
>
> strpos("hendogpenguin", "minotaur")
>
> will return FALSE.
>
> --
> Oli
>

 

Navigation:

[Reply to this 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

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