Reply to Re: How to escape string for preg_match?

Your name:

Reply:


Posted by tim on 05/11/06 00:17

squash@peoriadesignweb.com wrote:
> I have a string equal to 'www/' that I want to use in a preg_match. Php
> keeps giving me the warning:
>
> Warning: preg_match(): Unknown modifier '/'
>
> How can I escape the string so the / in www/ is not interpreted in the
> preg_match ?

Either with \
preg_match( '/www\//', $str )

or use a diffrent charcter as a delimiter
preg_match( '|www/|', $str )

Tim

[Back to original 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

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