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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:07:18+00:00 2026-06-10T00:07:18+00:00

I have a JS string which contain text between double quotes ( ). I

  • 0

I have a JS string which contain text between double quotes ("). I want to replace that text by another user-entered text by using RegEx but I do not know how to do that. For example:

Given string:

The book "A Farewell to Arms" will be published again.

New text: Gone with the Wind –> the above sentence will be

The book "Gone with the Wind" will be published again.

Could you please help me to solve this case? Sorry for this dummy question because I am new to JS RegEx.

  • 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-10T00:07:19+00:00Added an answer on June 10, 2026 at 12:07 am

    This should do it..Spare me for my typo mistakes.I am not a javascript dev

    str.replace(/".*?"/,"\"Gone with the Wind\"");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a string field which can contain XML or plain text. The XML
I have a text field where users enter a URL string, which cannot contain
I have a string which contains binary data ( non-text data ). How do
I have a string which may contain cell address, which is look like: A1,
I have the following string which will probably contain ~100 entries: String foo =
I am have a string named begin_date which contain date in the format dd.mm.yyyy
I have a string which contains only numbers. Now I want to remove all
I have a requirement. I have a text which can contain any characters. a)
I have a string which contains the text of an article. This is sprinkled
I have a String which contains the following sub string: [Qual:3] [Text:PIX 1252471471953/YHYF/PPP121.40/10RTY10/NOLXX08X1] [Elem:123]

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.