Reply to Re: preg_match - windows filenames

Your name:

Reply:


Posted by Alvaro G Vicario on 08/03/05 13:28

*** Chuck Anderson wrote/escribió (Tue, 02 Aug 2005 12:43:27 -0600):
> I am trying to work out the preg_match command to check windows
> filenames for illegal characters and I can not seem to get it right.
> The disallowed characters are \/:*?"<>|
>
> I can not figure out the correct syntax.

Hope this helps (not tested):

$forbidden=preg_quote('\/:*?"<>', '/');
preg_match('/[' . $forbidden . ']/', $filename);


--
-- Álvaro G. Vicario - Burgos, Spain
-- http://bits.demogracia.com - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group
--

[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

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