filter_var using regex

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux