Link to home
Start Free TrialLog in
Avatar of kadin
kadinFlag for United States of America

asked on

(?i) What does this mean? I think it means match any word regardless of case.

(?i) What does this mean? I think it means match any word regardless of case.

ForceType application/octet-stream
Header set Content-Disposition attachment
<FilesMatch "(?i)\.(gif|jpe?g|png)$">
    ForceType none
    Header unset Content-Disposition
</FilesMatch>
Header set X-Content-Type-Options nosniff
ASKER CERTIFIED SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The regex pattern, broken down:
(?i)  ignore case
\. match a literal . character
(gif|jpe?g|png) match any one of gif or jpg or jpeg or png
$ match the end of the string

Open in new window

So to summarise it means to match a file with name ending in .gif, .jpg, .jpeg or .png.
Avatar of kadin

ASKER

Thanks for your help.