Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Regex... unc path --Help

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,61937
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Regex... unc path --Help
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Regex... unc path --Help - 6/27/2008 11:07:05 AM   
  yfki

 

Posts: 75
Score: 0
Joined: 12/12/2007
Status: offline
((?:[a-zA-Z]:)|(?:\\{2}\w[-\w]*)\$?)\\(?!\.)((?:(?![\\/:*?<>"|])(?![.\x20](?:\\|$))[\x20-\x7E])+\\(?!\.))*((?:(?:(?![\\/:*?<>"|])(?![ .]$)[\x20-\x7E])+)\.((?:(?![\\/:*?<>"|])(?![ .]$)[\x20-\x7E]){2,15}))?

This pattern will match any the following:

   C:\
   \\Server\share\path\File.txt
   E:\My Files\Are\#1\



Trying to get it to match

   \\Server\share\path\File



I am stuck, any help would be great!
 
 
Post #: 1
 
 RE: Regex... unc path --Help - 6/27/2008 11:38:54 AM   
  yfki

 

Posts: 75
Score: 0
Joined: 12/12/2007
Status: offline
much better...

(\\\\[\w-]+\\[^\\/:*?<>|""]+)((?:\\[^\\/:*?<>|""]+)*\\?)

(in reply to yfki)
 
 
Post #: 2
 
 RE: Regex... unc path --Help - 6/27/2008 4:03:57 PM   
  dm_4ever


Posts: 2593
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
I found this one you may want to check out "\\\\\w+?(?:\\[\w\s$]+)+"

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to yfki)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Regex... unc path --Help Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts