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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
(?<=(?:\\))[a-zA-Z0-9\-\s_]*(?=(?:\.\w*$))
Description
WINDOWS ONLY Useful to get the filename whenever you get it from anysource, recommended for non-critical filename-dependant applications.
Matches
c:\program files\anyfolder\file.xls | c:\program files\any.folder\file with weird name_.xls
Non-Matches
c:\program files\anyfolder\file*.xls | c:\program files\anyfolder\file?.xls | c:\program files\anyfo
Author Rating: Not yet rated. Jose Paez
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

Title: My mistake
Name: Jose Paez
Date: 8/11/2005 7:00:11 PM
Comment:
You are right, my mistake


Title: Fails to mention "windows only"
Name: Randal L. Schwartz
Date: 8/11/2005 6:49:37 PM
Comment:
This is clearly not a regex for unix, however it doesn't say "windows only".


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