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-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w ]*.*))+\.(txt|TXT)$
Description
It matches .jpg files. It allows for a dot in the path. A dot may occur in such directories as: C:\Documents and Settings\roman.lukyanenko\Desktop\stuff\b_card2.txt or C:\Windows\Microsoft.NET etc
Matches
C:\Documents and Settings\roman.lukyanenko\Desktop\stuff\b_card2.txt
Non-Matches
C:\file.doc
Author Rating: The rating for this expression. Roman Lukyanenko
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: c:\1 folder\some.txt doesntwork
Name: Wiz
Date: 1/11/2007 9:34:46 AM
Comment:
is a valid folder


Title: would \.[Tt][Xx][Tt] work for the file extension?
Name: Lou
Date: 9/8/2005 5:10:16 PM
Comment:
This slight change of your pattern allows for mixed case in the file extension: ^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w ]*.*))+\.[Tt][Xx][Tt]$


Title: misprint in description
Name: ManInBlack
Date: 8/3/2005 8:56:42 AM
Comment:
possibly, .txt, not .jpg? ;)


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