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 3872882
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T21:58:26+00:00 2026-05-19T21:58:26+00:00

I need to do some global changes to a number of spreadsheets and I

  • 0

I need to do some global changes to a number of spreadsheets and I think the best way is to use regular expressions so I have added a reference to Microsoft VBScript Regular Expression type library and can now process regular expressions. I am using a function with the following signature:

RegExpSubstitute ( target as string, searchREGEX as string, replaceREGEX as string) as string

I have a number of cells with contents like this:

'ALBERTS1:XLRI_CHEM_CHEMICAL_1' * 'Albert_Chemicals_SG_Lime' * 'Albert_Chemicals_Conc_Lime' * 'Albert_Lime_price' / 1000

All the stuff starting “‘Albert_” need to be changed to “‘ALBERTS1-” and all the other underscores in that symbol need to be changed to dashes. The first part I can do with:

new = RegExpSubstitute(old, "(')([^-:_ ]+)(_)([^']*)(')", "$1" & scadaPrefix & "-$4$5")

but that only replaces the first ‘_’ with ‘-‘ and I need to do all the others in that symbol. The first symbol, starting with “‘ALBERTS1:” should not be changed.

At the moment, I am thinking that the best thing to do is split the string into symbols on the space character and then process each symbol separately, but can I do the whole thing in one search & replace?

  • 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-05-19T21:58:26+00:00Added an answer on May 19, 2026 at 9:58 pm

    Sorry, no, you could only do that with a regex engine that supports infinite-length-lookbehind, and ECMAScript engines don’t do that.

    You’ll have to process each entry separately, and if it starts with Albert_, then do the replacements on it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need a way to stash some data that is global to the browser.
I'm developing a Class Library / API and I need to store some global
Need some help, please. I have a line of horizontal thumbnails loaded as ONE
Need some help to solve this. I have a gridview and inside the gridview
Need some help from javascript gurus. I have one page where http://www.google.com/finance/converter is embedded
In my application I have use some data ValueCell (something like 20) and I
I need to remove certain accounts (like the "Everyone" trustee or some global group
I have some global variables in a Python script. Some functions in that script
need some help with retrieving information+Profile pic from twitter using php , i wanted
Need some guidance figuring out what went wrong. I've been using mysql, phpmyadmin for

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.