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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Linux Path Verify
Expression
^/{1}(((/{1}\.{1})?[a-zA-Z0-9 ]+/?)+(\.{1}[a-zA-Z0-9]{2,4})?)$
Description
This expressions was written for C#. Matches all valid Linux absolute paths (files or folders). Will not work for relative paths that do not begin with a /, Also will only match files that have extensions consisting of 2, 3, or 4 characters. Currently fails with _ . or - in the path, this will be updated at some point.
Matches
/mnt/share/ | /home/.BASH | /mnt/share/pic.jpeg | /mnt/share/install.sh
Non-Matches
mnt/share | //mnt///share// | /mnt/share/install.installer | /home\user
Author Rating: The rating for this expression. Brandon Vasquez
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: =D
Name: Bill
Date: 4/8/2009 5:17:35 PM
Comment:
should also mention it will only match files that have extensions consisting of 2, 3, or 4 characters


Title: =D
Name: Bill
Date: 4/8/2009 5:15:51 PM
Comment:
should also mention it will only match files that have extensions consisting of 2, 3, or 4 characters


Title: =D
Name: Bill
Date: 4/8/2009 5:14:42 PM
Comment:
should also mention it will only match files that have extensions consisting of 2, 3, or 4 characters


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