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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Simple Windows filename finder
Expression
([0-9a-z_-]+[\.][0-9a-z_-]{1,3})$
Description
Will match a Windows filename containing alphanumerics, hyphens (-) and underscores (_). There is no length limit on the first part of the filename, but the extension must be between 1 and 3 characters.
Matches
open_01.pdf, 00153._-, _abc_.--1
Non-Matches
readme.e$e, save6^.doc, open_01., .txt, leisure.docx
Author Rating: Not yet rated. Nick
Source
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

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