Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9311227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T01:18:41+00:00 2026-06-19T01:18:41+00:00

I am writing a script that will rename so exported PST files to match

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-19T01:18:43+00:00Added an answer on June 19, 2026 at 1:18 am

    Assuming you want to break the pascal cased name on caps you can capture lower-case followed by upper-case & insert a “.”;

    set re = New RegExp
    re.Pattern = "([a-z])([A-Z])"
    re.global = true
    
    filename = "JoeBloggs_Export_001.pst"
    
    msgbox replace(re.Replace(fileName, "$1.$2"), "_Export_", "@emaildomain.com._")
    
    >> Joe.Bloggs@emaildomain.com._001.pst
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a script that will constantly scan iTunes for new dialog boxes and
I am writing a script that will be polling a directory looking for new
I am writing an SVN script that will export only changed files. In doing
I'm writing a script that will combine and minify requested CSS files and then
I'm writing a small script that will match a shoe size from a shoe
I'm writing a Powershell script that will extract a set of data files from
I'm new to Python. I am writing a script that will numerically integrate a
I'm writing a MEL script that will rename all of the joints in a
I'm writing a script that will grab several files and then copy them into
I am writing a script that will look in a custom reports directory, copy

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.