Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Form Regex - Gaps in file names

Quote Reply
Form Regex - Gaps in file names
Hi, I was using ^|.*\.(?i:gif|jpg|png)$ until I found out that any file type could be uploaded so I emailed support and Jack gave me ^([%\w-]+\.(?:jpe?g|JPE?G|gif|GIF|png|PNG)|)$ which works fine. I am finding most of my users are uploading files like 1a 2b.jpg and the gap/whitespace is giving them a error, how would I modify the above so that only images can be uploaded but the image can have any character in the filename including white space?
Subject Author Views Date
Thread Form Regex - Gaps in file names garrynz 3156 Jul 28, 2005, 10:44 AM
Thread Re: [garrynz] Form Regex - Gaps in file names
Andy 3095 Jul 28, 2005, 11:14 AM
Thread Re: [Andy] Form Regex - Gaps in file names
garrynz 3090 Jul 28, 2005, 11:35 AM
Thread Re: [garrynz] Form Regex - Gaps in file names
Andy 3089 Aug 4, 2005, 12:00 AM
Thread Re: [Andy] Form Regex - Gaps in file names
Robert 3045 Oct 7, 2005, 11:11 PM
Thread Re: [Robert] Form Regex - Gaps in file names
Andy 3051 Oct 8, 2005, 12:58 AM
Thread Re: [Andy] Form Regex - Gaps in file names
Robert 3036 Oct 8, 2005, 4:17 AM
Post Re: [Robert] Form Regex - Gaps in file names
klangan 3014 Oct 10, 2005, 11:11 AM