I am writing a script that will rename so exported PST files to match the format needed for import to a new system.
I am trying to use regular expression in VBScript to do this along with Replace.
An example string:
JoeBloggs_Export_001.pst
Required End Result:
Joe.Bloggs@emaildomain.com._001.pst
I have obviously got the replace of Export with @emaildomain.com. working with Replace.
I am struggling to get the insert of . between the First-name and Last-name, I figured using a regular expression to do this would be the best approach. I am struggling with getting this to work. Obviously the length of the first-name varies.
I have now tried various regular expressions, so rather than sharing any of these I am hoping getting a fresh set of eyes will help to highlight where I have been going wrong.
Many thanks in advance.
Mark
Assuming you want to break the pascal cased name on caps you can capture lower-case followed by upper-case & insert a “.”;