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

Posted by John Dunlop on 07/24/05 12:43

Randell D. wrote:

> 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...)

That's what they do, for differing values of 'alpha'. The ^
negates the character class, so [^a-z] matches everything
except a, b, c, ... z. [[:alnum:]] in addition to the decimal
digits can cover other letters. \W matches any non-word
character (word = letters, numbers and underscore, where
'letters' depends on your locale settings).

--
Jock

 

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

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