RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 1
Title Test Details Match File Extension
Expression
\.([A-Za-z0-9]{2,5}($|\b\?))
Description
Pattern matches all file extensions from two(2) to five(5) characters in length (e.g. Adobe Illustrator [*.ai] or Extensible Hypertext Markup Language [*.xhtml]). Input can be an absolute path, relative path, URI, directory path, etc. If there are get variables in a URI input, they are ignored.
Matches
http://regexlib.com/Add.aspx | /path/to/filename.txt | TheSpanishInquisition.mpeg | 42.ai | Dont Panic.xhtml | http://localhost/webPage/index.php?variable=value
Non-Matches
Non-extentionFileName | FilenameWithOneCharacterExtension.q | FIlenameWithSixOrMoreCharactersExtension.invalid
Author Rating: The rating for this expression. Akoi Meexx
   Displaying page 1 of 1 pages; Items 1 to 1

Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials