You are here: Re: preg_match not working « PHP Programming Language « IT news, forums, messages
Re: preg_match not working

Posted by p on 03/07/06 00:57

> $result = preg_match("[0-9][0-9]","12")
>
> gives me an error of: Unknown modifier '['
>
> and
>
> $result = preg_match("hello","hello")
>
> gives me an error of: Delimiter must not be alphanumeric or backslash

You still need to wrap the regex in slashes I believe:

$result = preg_match("/[0-9][0-9]/","12")
$result = preg_match("/hello/","hello")

Hope that helps,
Pete

 

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

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