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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:47:57+00:00 2026-05-27T04:47:57+00:00

i have a list named simple and all its objects are in the form

  • 0

i have a list named simple and all its objects are in the form below:

Tag:  textbook - sacred texts   Rec Id: 10011095 
Tag:  advocacy  Rec Id: 10037815 
Tag:  advocacy  Rec Id: 10043396 
Tag:  advocacy  Rec Id: 10037795 
Tag:  advocacy  Rec Id: 10031437 
Tag:  advocacy  Rec Id: 10035721 
Tag:  advocacy  Rec Id: 10024853

and i have a second list called fullList with objects like:

10055853    What's the Matter with the Internet? by Mark Poster      academic    1       0,083

10055853    What's the Matter with the Internet? by Mark Poster      computers       1       0,083

10055853    What's the Matter with the Internet? by Mark Poster      internet    2       0,167

i split every line of the simpe list in order to get two strings.
The first one has the word(s) after “Tag:” and before “Rec Id:” and the second the numbers after Rec id.

Example: tagGB  = textbook - sacred texts
rec_idGB = 10011095

And then i want to search if there IS’NT any line(object) from list fullList that contains BOTH (in the same line) that two strings.

I tried that:

 foreach (String line in nonZeroList)
        {

            foreach (String line2 in Gblist)
            {

            rec_idGB = line.Split('\t')[0].Substring(4).Trim();
            tagGB = line.Split('\t')[2].Substring(7).Trim();

            if (line.Contains(rec_idGB) == false && line.Contains(tagGB) == false)
            {

            }


        }
    }

but i get a lot of lines that doesnt contain that strings.
I want to get as a resutl only the rec_idGB and tagGB that are not BOTH in the same line of the fullList. Any suggestions?

  • 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-05-27T04:47:58+00:00Added an answer on May 27, 2026 at 4:47 am

    I want to get as a resutl only the rec_idGB and tagGB that are not BOTH in the same line of the fullList.

    So you want all lines in simpleList that can’t be matched with any line in fullList? (Or do you want for each line in fullList get all lines in simpleList that doesn’t match? I guess not.)

    foreach (string line in simpleList)
    {
        string rec_idGB = line.Split('\t')[0].Substring(4).Trim();
        string tagGB = line.Split('\t')[2].Substring(7).Trim();
        bool thereIsAMatch = false;
        foreach (string line2 in fullList)
        {
            if (line2.Contains(rec_idGB) && line2.Contains(tagGB))
            {
                thereIsAMatch = true;
                break;
            }
        }
        if(!thereIsAMatch)
        {
            // This is what you want?
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a List of Foo. Foo has a string property named Bar. I'd
So let's assume I have a class named ABC that will have a list
So I have a view that does a queryset and returns a simple list:
I have a list like this: <select name=select_list_name id=list_id> <option value=>Select Option</option> <option value=value1>Option
I have a list of names that I want to match case insensitive, is
I have a list of variable names, like this: ['foo', 'bar', 'baz'] (I originally
I have a list of company names and the user has to enter his
I have list in python which has following entries name-1 name-2 name-3 name-4 name-1
Let's say I have a list of domain names that I would like to
Here's the issue: I have a list of App names that I want to

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.