You are here: Re: what does a dot "." mean in regex, when it is in brackets? « All PHP « IT news, forums, messages
Re: what does a dot "." mean in regex, when it is in brackets?

Posted by Stefan Rybacki on 11/03/05 21:40

billy wrote:
> | ^content/([^/]+)/([^.]+)$
> |
> | I know the "^" means "not".
>
>...
> [^.]+ means that "aba" is fine but "aab" is not since one "a" immediately
> follows another (adjacent).

That is definitely wrong. See my other posting.

And if you don't believe try this:

$test="aaaabbbb.lblal";

preg_match("/([^.]+)/",$test,$result);

print_r($result);

This expression matches on anything before . even if a follows a follows a follows a ...
follows b ...

Regards
Stefan

>
> hth,
>
> me
>
>

 

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

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