Reply to Re: Regulgar Expression syntax help...

Your name:

Reply:


Posted by Tim Van Wassenhove on 07/22/05 05:27

On 2005-07-21, Randell D. <support@fiprojects.moc> wrote:
> I'm using PHP 4.x and would basically like to replace whatever is not
> named above with an empty character (thus if a bang or question mark was
> in a string, it would be removed from the string).
>
> I know I could use something like preg_replace, but I don't know how to
> say "when not found"... In sed, I could do something like
>
> sed -e -i 's/[a-z]|[0-9]|_//g'
>

preg_replace("#[^a-z0-9_]#", "", $subject);

--
Met vriendelijke groeten,
Tim Van Wassenhove <http://timvw.madoka.be>

[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

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