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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^\\{2}[\w-]+\\(([\w-][\w-\s]*[\w-]+[$$]?$)|([\w-][$$]?$))
Description
Validates a UNC to conform to \\server\service Must have a "\\" at the start Server may contain alpha/numeric/underscore/dash, Followed by another single "\" Service may contain alpha/numeric/underscore/dash/$/space Note: Service may not start nor end with a space Service may only contain one $, and only at the end No additional "\" may follow afterwards
Matches
\\server\service | \\server\my service | \\serv_001\service$
Non-Matches
\\my server\service | \\server\ service | \\server$\service
Author Rating: The rating for this expression. Paul Haines
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: TestFindPattern Title ^\\{2}[\w-]+\\(([\w-][\w-\s]*[\w-]+[$$]?$)|([\w-][$$]?$))
Name: Paul Haines
Date: 1/16/2019 6:46:21 AM
Comment:
Good


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