You are here: Re: [PHP] Regexp help second « PHP « IT news, forums, messages
Re: [PHP] Regexp help second

Posted by Andrew Kreps on 01/06/05 20:09

On Thu, 06 Jan 2005 13:50:58 +0100, Uroš Gruber <uros.gruber@sir-mag.com> wrote:
>
> 1) this is some domain.com test
> 2) domain.com
>
> I can make this work either for first example of fo second, but not for
> both. What I want is replace of domain.com to get
>
> this is dome domain.com domain com test so replace should be
> \1 \2 \3
>
> so for second example I did /((.+)\.{1}(.+))/
>
> How can I extend this to work in both.
>

Can you explain in a little more detail what you're trying to replace
domain.com with? I'm having trouble understanding your intentions. A
regular expression like: /([\w-]+)\.([\w-]+)/ should be able to grab
strings like domain.com in any type of string (I'm using the
preg_replace function).

 

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

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