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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:34:55+00:00 2026-06-17T12:34:55+00:00

Given a string in between quotations, as such Hello The following regular expression will

  • 0

Given a string in between quotations, as such “Hello”

The following regular expression will print out a match of the string without the double quotations:

/"([^"]+)"/

I don’t understand how it is capturing the characters. I believe what this should be capturing is just the initial double quote. What this regular expression is saying is find an expression that starts and ends with double quotes and again has one or more double quotes at the beginning. And it captures that one or more double quotes at the beginning. How does it end up matching the string here with [^"]+ ?

  • 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-17T12:34:56+00:00Added an answer on June 17, 2026 at 12:34 pm

    The expression [^"]+ means literally to match all characters which are not the double quote ". So when placed inside (), all characters following the first " and up to the next " are captured. This is because the ^ inside a [] character class implies negation rather than the start of a string as it would mean outside the []. So [^"] literally means anything but a ".

    The () itself is the capture group, and the regex will only capture the expression which exists inside (). Depending on the programming language you use, it may also record the entire string matched "Hello" by the entire expression /"([^"]+)"/ in a separate variable, but the purpose of () is to capture its contents.

    Full breakdown of the expression:

    • " – first literal quote
    • ( – begin capture
    • [^"]+ all subsequent characters up to but not including "
    • ) – end capture group
    • " – final closing quote literal
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

what would be the regular expression to check if a given string contains atleast
Given the following string in C#, how would I insert a character in between
I'm having some trouble trying to develop a regular expression which will pick out
Given the following string, how would I extract the string between the quotes that
Given a string object like this: twohundred = 200 What is the difference between
Given a string, I want to retrieve a string that is in between the
I have a pattern @@{} and given a string I need to find out
Given an input string such as word1 word2 word3 word4 , what would be
I need to check if a given string is in between a range of
Given the string value: ?*8 100 0 I'd like the value between the two

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.