You are here: Re: Regulgar Expression syntax help... « PHP Programming Language « IT news, forums, messages
Re: Regulgar Expression syntax help...

Posted by Randell D. on 07/24/05 10:50

John Dunlop wrote:
> Tim Van Wassenhove wrote:
>
>
>>#[^a-z0-9_]#
>
>
> and #2 of the 100 ways to write that expression - probably
> *the* most common in c.l.php - involves + optimi[sz]ation
> (likely not appreciable though):
>
> #[^a-z0-9_]+#i <- case-insensitive, mind
>
> in at no. 3, the less explicit:
>
> #[^[:alnum:]_]+# //no need for 'i'; can match non-US-ASCIIs
>
> down at number 4, the shorter and even more implicit:
>
> #\W+# //as with 2, can match non-US-ASCIIs, no need for 'i'
>
> they're all different in their own inimitable ways.
>

Thanks to you both for the suggestions...

My internet access is limited at the moment but I will test this in a
few hours (when I have my LAMP machine)...

However... I'm curious, the solutions provided, when used with
preg_replace, would replace any of those characters, as opposed to
replace anything BUT those characters... (ie I want to replace anything
that is NOT alphanumeric or an underscore with a nospace...)

Thanks again for the help,
Randell D.

 

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

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