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 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
   Displaying page 1 of 1 pages; Items 1 to 1

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