I recently started a internship where I get to code UiPath which is all new to me. I'm wondering (and I hope I can phrase this correctly) if there is a way to remove the extension of a filename (if there is one) using regular expression, whilst passing the argument to it's function.
For ex. I want to print my file "exampleFile.exe" as just "exampleFile" without actually changing the variable itself.
I cant figure out how to incorporate the RegEx I currently have to remove everything after the last "." found in a string. This is the expression I have: /\.[^.]*$/
I will also append a screenshot of the actual code I'm working with.
This code currently creates a file named "(Current file name).xml_metadata.xml" and I of course only want .xml at the very end
destinationFolderPath + "\" + CurrentFile.Name + "_metadata.xml"
Hope any kind soul can help a struggling junior out!
Tried to remove the ending of a string and it just throws me an error.