fork(3) download
  1. Imports System
  2. Imports System.Text.RegularExpressions
  3.  
  4. Public Class Test
  5. Public Shared Sub Main()
  6. Dim fileName = "\something\folderName\subFolder\randomOtherStuff"
  7. Dim newValue = "<NEW_VALUE>"
  8. Dim res = Regex.Replace(fileName, "\\folderName\\subFolder\\.*", "\" & newValue)
  9. Console.WriteLine(res)
  10. End Sub
  11. End Class
Success #stdin #stdout 0.08s 25328KB
stdin
Standard input is empty
stdout
\something\<NEW_VALUE>