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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:46:42+00:00 2026-06-14T02:46:42+00:00

I have a text and want to find some strings with regular expressions. My

  • 0

I have a text and want to find some strings with regular expressions. My problem is i don’t know how to make “&&-and” here.

I have text like this:

AB " something is here;
  and here...
";
...
AB "new line 
 continues ... ";

I want to find all AB, which end with “;

My code i use for “;” :

var matches = Regex.Matches(tmp, "(AB) ([^;]*);", RegexOptions.Singleline);

But how can i make "(AB) ([^(\";)]*)\";" or just "(AB) ([^(\"&&;)]*)(\"&&;") ?

I would like to have:

AB

" something is here;
 and here ...
"

AB
"new line
 continues ..."
  • 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-14T02:46:43+00:00Added an answer on June 14, 2026 at 2:46 am

    ^ can only negate character classes, which in turn cannot contain strings of characters (but only single characters). However, there is a similar concept for strings of characters (or in fact full-fledged regular expressions) called a negative lookahead:

    @"(AB) (\"(?:(?!\";).)*\");"
    

    This will now consume arbitrary characters (.) as long as they do not mark the start of a ";. Keep using the Singleline option, of course. You can do some reading on lookaround assertions here.

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

Sidebar

Related Questions

I have some unicode text that I want to clean up using regular expressions.
I have two MySQL tables, and I want to find and replace text strings
I want to know how to replace some text in php string with like
Here's my problem (I'm programming in C): I have some huge text files containing
I have some problem with my regular expression. I need to find all functions
I have some text which I want to have on separate lines. I try
if i want to have some text show up in a calligraphy font, how
I have some text/images that I only want to display in the normal state
I am working in jquery and javascript.Here is my problem. I have want to
I have a text file in which I want to find all of ID:=

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.