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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T03:12:51+00:00 2026-06-06T03:12:51+00:00

Given a string, I want to retrieve a string that is in between the

  • 0

Given a string, I want to retrieve a string that is in between the quotation marks, and that is fully capitalized.

For example, if a string of

oqr”awr”q q”ASRQ” asd “qIKQWIR”

has been entered, the regex would only evaluate “ASRQ” as matching string.

What is the best way to approach this?

Edit: Forgot to mention the string takes a numeric input as well I.E: “IO8917AS” is a valid input

  • 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-06T03:12:53+00:00Added an answer on June 6, 2026 at 3:12 am

    EDIT: If you actually want “one or more characters, and none of the characters is a lower-case letter” then you probably want:

    Regex regex = new Regex("\"\\P{Ll}+\"");
    

    That will then allow digits as well… and punctuation. If you want to allow digits and upper case letters but nothing else, you can use:

    Regex regex = new Regex("\"[\\p{Lu}\\d]+\"");
    

    Or in verbatim string literal form (makes the quotes more confusing, but the backslashes less so):

    Regex regex = new Regex(@"""[\p{Lu}\d]+""");
    

    Original answer (before digits were required)

    Sounds like you just want (within the pattern)

     "[A-Z]*"
    

    So something like:

    Regex regex = new Regex("\"[A-Z]*\"");
    

    Or for full Unicode support, use the Lu Unicode character category:

    Regex regex = new Regex("\"\\p{Lu}*\"");
    

    EDIT: As noted, if you don’t want to match an empty string in quotes (which is still “a string where everything is upper case”) then use + instead of *, e.g.

    Regex regex = new Regex("\"\\p{Lu}+\");
    

    Short but complete example of finding and displaying the first match:

    using System;
    using System.Text.RegularExpressions;
    
    class Program
    {    
        public static void Main()
        {
            Regex regex = new Regex("\"\\p{Lu}+\"");
            string text = "oqr\"awr\"q q\"ASRQ\" asd \"qIKQWIR\"";
    
            Match match = regex.Match(text);
            Console.WriteLine(match.Success); // True
            Console.WriteLine(match.Value);   // "ASRQ"
        }    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to write a javascript function that returns HTML content as string given
Given a string such as: a:2:{i:0;s:1:1;i:1;s:1:2;} I want to find every integer within quotes
Given a string string result = "01234" I want to get the separate integers
I want to open a file whose name should be given as string to
I want to do a very simple job: given a string containing pronouns, I
I want to use this for an object factory: Given a string, create a
in MYSQL, given a string with dots in it, I want to select everything
Given a potentially huge integer value (in C# string format), I want to be
Given the following code: int i; ... ostingstream os; os<<i; string s=os.str(); I want
I want to retrieve all the RULE nodes that have one or more attributes

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.