You are here: Re: ereg regexp problem « All PHP « IT news, forums, messages
Re: ereg regexp problem

Posted by J.O. Aho on 09/30/07 15:52

rallykarro@hotmail.com wrote:
> Hi,
>
> I have a problem of matching a dash(-) in the code beolow.
> Why does not the below work when matching a dash(-) but all other
> signs is correctly matched when trying?
>
> $res = ereg("^[a-zA-Z\.\-\,\/\Å\å\Ä\ä\Ö\ö\Ü\ü\ß\é\æ\ø\Æ\Ø ]+$", "-");
>
> I am running PHP Version 5.0.5 on windows.

$res = ereg("^[a-zA-Z\.\,\/ÅåÄäÖöÜüßéæøÆØ -]+$", "-");

The '-' should be last if it's to compared to, anywhere else it will be used
to mark a range.

--

//Aho

 

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

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