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

  • Home
  • SEARCH
  • 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 8625053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:41:12+00:00 2026-06-12T07:41:12+00:00

I am maintaining an old system that have saving issue when a string contains

  • 0

I am maintaining an old system that have saving issue when a string contains a single quote.

For example these will fail:

"update table set column2 = 'O'Connell', column3 = 'O'Riordon' where column1 = 1"
"insert into table (column1, column2, column3, column4, column5, column6, column7) values('O'Reilley','state, postcode','',1,2,'O'Riordon')". 

So far I’ve came up with this working vbscript regular expression

([,=(]\s*'[^']*)'([^']*'\s*[,)\s])

Is it possible to write a vbscript regular expression without using the header [(|=|\s|,] and trailer [,|)|\s]?

Thanks.

EDIT: Fix the posted regex to remove | from header and trailer.
The regexp is used as follows

regexp.replace("string","$1''$2")
  • 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-12T07:41:13+00:00Added an answer on June 12, 2026 at 7:41 am

    The only way I can think of works only if the string that contains the single quote never contains whitespace. In that case, you can search for

    \B'([^'\s]*'[^'\s]*)'\B
    

    Explanation:

    \B        # Assert that there is no alphanumeric character before...
    '         # the opening quote
    (         # Match and capture...
     [^'\s]*  # Any number of non-quote/non-whitespace characters
     '        # One quote
     [^'\s]*  # Any number of non-quote/non-whitespace characters
    )         # End of capture group 1
    '         # Match the closing quote
    \B        # Assert that there is no alphanumeric character afterwards
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an OLD mac C/C++ program that I'm maintaining. It's still based on
I have an old vb6 app that I'm in charge of maintaining that saves,
I have an old ASP.NET 1.1 site that I am maintaining. We are working
A programmer on your team is great at maintaining the old legacy system. But
I'm currently maintaining an "old" system written in C# .NET, removing some obsolete features
We're maintaining an old video game that uses a full-screen 256-color graphics mode with
While maintaining an old product, I came across an error that results in the
I recently started maintaining an old EJB2 application running on OC4J. That includes EJB
Am I right thinking that Tigris.org have stopped maintaining their SVN binary package for
I have an old classic ASP site I'm maintaining and in the midst of

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.