dim myRegExpset myRegExp = New RegExpmyRegExp.IgnoreCase = False 'no needmyRegExp.Global = False 'replace once onlymyRegExp.Pattern = "\\[^\\]*$" 'match everything from the last \ to the end of the string