Hello All,
I have a string that can theoritically have “N” forward slashes in it. I want to remove only the last one.
Var strInput, strOutput As String
Var re as New RegEx
strInput = "Some text that I need for this example / And yet some more text I need /"
re.SearchPattern = "/$"
re.ReplacementPattern = ""
re.SearchStartPosition = strInput.Length - 3
strOutput = re.Replace(strInput)
In the output I see both the slashes still in the string.
Any idea where I am going awry?
14 posts - 7 participants