Hi,
I need a regular expression that will match any filename.extension except for anything.gif, anything.jpeg, anything.html, anything.whatever_else_I_will_come_up_with (has to be expandable)
Please help
Jimiques
need a regex to match everything but GIF,JPEG and HTML files
Moderator: General Moderators
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
I think you need to match them and leave the negation in your PHP logic
try:
try:
Code: Select all
\w+\.(?:html?|gif|jpe?g)$Code: Select all
\S+\.(?!(?:gif|jpeg|html)\b)[a-z]+\b- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact: