filter_var using regex

From: Date: Wed, 04 May 2011 19:20:55 +0000
Subject: filter_var using regex
Groups: php.general 
Request: Send a blank email to php-general+get-312666@lists.php.net to get a copy of this message
I am running into a problem using the REGEXP option with filter_var(). The string I am using: 09VolunteerApplication.doc The PCRE regex I am using: /^[a-z0-9]\.[doc|pdf|txt|jpg|jpeg|png|docx|csv|xls]{1,4}$/Di The function in it's entirety: return (!filter_var('09VolunteerApplication.doc', FILTER_VALIDATE_REGEXP, array('options'=>array('regexp'=>'/^[a-z0-9]\.[doc|pdf|txt|jpg|jpeg|png|docx|csv|xls]{1,4}$/Di')))) ? false : true; Anyone have any insight into this?

« previous php.general (#312666) next »