I'm trying to do something with a macro, and I feel RegEx is the way to go, but I'm having a hard time understanding the logic behind it.
I have variables containing spaces, hyphens and/or underscores and I would like to delete everything after the first iteration of one of these characters.
For example :
35_Project_Subproject >> 35 (deleting everything after the first underscore)
35 Project Subproject >> 35 (deleting everything after the first space)
35-Project-Subproject >> 35 (deleting everything after the first hyphen)
Could you please help me figure out the correct way to do it and the logic behind it?
Hi tiffle,
No, it can be any character sequence between all digits, all letters, or a combination of the two, the idea would be to keep the first word, whether it's made of letters or numbers
Hi JMichaelTX,
Thanks a lot for the link that explained your RegEx, it allows me to understand the language a little bit better
I'll implement that in the macro and get back to you, thanks a lot