VB regex question

Results 1 to 2 of 2

Thread: VB regex question

  1. #1
    Join Date
    Dec 1969

    Default VB regex question

    Can someone give me the correct VB regex pattern to change<BR><BR>E\filename<BR>to<BR>\servernamefilen ame<BR><BR>I&#039;ve been trying variations on<BR><BR> strFilepath = Regex.Replace(input, "E\\","\\CSIVR01\CallRecKC\")<BR><BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: VB regex question

    &nbsp;<BR>[code language="VB.NET"]Dim ServerName As String = "\servername"<BR>strFilepath = Regex.Replace(input, "^E\", ServerName)[/code]<BR><BR>it appears you were using RegEx sytax in the 3rd parameter, that&#039;s not a place for it (only the second "match" parameter)<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts