Re: extract UNC path using regular expression

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: ksr (k_srirama_at_nospam.hotmail.com)
Date: 07/27/04


Date: Mon, 26 Jul 2004 21:13:50 -0700

Thnaks for the reply. This is what the requirement is.. There is a multiline
textbox and users can enter some text and UNC path. If there is space
between the words inside path then the path will be enclosed in <path goes
here> . I am new to regular expressions and looking for some help in this
regard.

Hope this clears the logic part of it. Please help me with this

Appreciate your help

TIA

"Jouni Heikniemi" <jouni-news@heikniemi.net> wrote in message
news:Xns9532EA397F489jouninews2heikniemin@127.0.0.1...
> "ksr" <k_srirama@nospam.hotmail.com> wrote in news:OV94Tn0cEHA.556
> @tk2msftngp13.phx.gbl:
>
> > I am looking for a regular expression that would extract UNC paths from
a
> > given string and place that inside a href.
> > Currently the expression fails if there is a space in the path..
> > eg. \\server\my doc.doc
> > is there a regular expression to do this?
>
> Regexps are not magic. If you have a string like "Jake, read the docs in
> \\server1\code documentation\coolproject for windows and its
> subdirectories", it's impossible to make a reasonable guess on where the
> UNC path might end.
>
> So, if you can come up with the logic first, then you can ask for a regexp
> representation.
>
>
> --
> Jouni Heikniemi, jouni-news@heikniemi.net
> http://www.heikniemi.net/hc/ (blog)



Relevant Pages

  • RE: Issue with UNC Path (I think). Trying to build Dynamic Report
    ... Dim strBroker As String ... You may just have to determine the UNC path, ... Table and then suck in all the data from my Excel sheet on the network drive. ...
    (microsoft.public.access.formscoding)
  • Re: Get shared folders real path
    ... "WNetGetConnectionA" (ByVal lpszLocalName As String, ... Dim lpszRemoteName As String ... ' retrieves the UNC path. ...
    (microsoft.public.word.vba.general)
  • Why cant I get the UNC?
    ... I'm trying to get the UNC path of a mapped network folder, ... Imports Scripting.FileSystemObjectClass ... Public Function GetUNCFromMappedDrive(ByVal driveLetter As String) As String ...
    (microsoft.public.dotnet.languages.vb)
  • Re: split a directory string into a list
    ... The most obvious case where it wouldn't work would be for a UNC path name. ... consider the first element with my function but you have to look at the ... first two elements if you just naively split the string. ... Also a relative windows path with a drive letter doesn't get fully split: ...
    (comp.lang.python)
  • Re: SYS(?)
    ... This api doesn't work with UNC path ex: ... STRING @ lpVolumeNameBuffer,; ...
    (microsoft.public.fox.programmer.exchange)