files are named like
name date _ uniqueid.pdf
result should be
name date _ somethingelse.pdf
I’ll be using a find/replace so don’t worry about the replace part. I just want to search matching the underscore.
This is NOT for c# .net, it is for find and replace in another program that accepts regex.
I’m really sorry I should’ve mentioned this. No languages, just plain regex. ie. /[^_].*
Thanks!
This is an example not taking into account any invalid characters in a file name
Group 1 of that regex would return uniqueid in your first example. If you want to capture the file extension as well you can use the following.
Edit:
C# Example with Regex.replace