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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Simple App Relative Path
Expression
^~/[0-9a-zA-Z_][0-9a-zA-Z/_-]*\.[0-9a-zA-Z_-]+$
Description
Matches the app relative path of a file. This will work for relative paths of URLs. Not very complicated but will work to do basic validation.
Matches
~/myPage.htm | ~/123._aBc2 | ~/Hello_World-Page.aspx
Non-Matches
mybadPage.htm | ~/.Not | ~/Very. | ~/Good
Author Rating: The rating for this expression. Brendan Enrick
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-2018, RegexAdvice.com | ASP.NET Tutorials