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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T01:01:46+00:00 2026-05-16T01:01:46+00:00

string[] pullspec = File.ReadAllLines(@C:\fixedlist.txt); foreach (string ps in pullspec) { string pslower = ps.ToLower();

  • 0
string[] pullspec = File.ReadAllLines(@"C:\fixedlist.txt");
foreach (string ps in pullspec)
{
    string pslower = ps.ToLower();
    string[] pslowersplit = pslower.Split('|');
    var keywords = File.ReadAllLines(@"C:\crawl\keywords.txt");
    if (pslower.Contains("|"))
    {
        if (pslower.Contains(keywords))
        {
            File.AppendAllText(@"C:\" + keyword + ".txt", pslowersplit[1] + "|" + pslowersplit[0] + "\n");
        }
    }
}

This doesn’t compile because of pslower.Contains(keywords) but I’m not trying to do 100 foreach loops.

Does anybody have 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-16T01:01:47+00:00Added an answer on May 16, 2026 at 1:01 am

    Using LINQ:

    if (keywords.Any(k => pslower.Contains(k)))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

String DocLocation = System.AppDomain.CurrentDomain.BaseDirectory + Files/test.pdf; // or String DocLocation = Url.Content(~/Files/test.pdf); var document
string tags = 9,3,12,43,2 List<int> TagIds = tags.Split(','); This doesn't work cause the split
String to split: java[d]program Expected output: java and program but got output: java[ and
String data=this we want append in that file; byte[] getbyte = data.getBytes(); outputstream.write(getbyte); outputstream.flush();
String mimetype = .docx\tapplication/vnd.openxmlformats-officedocument.wordprocessingml.document; File file = new File(FilePath, filename); Intent intent = new
String[] tokens = s.split(' '); for(int i = 0; i < (tokens.length) - 1;
String.split() generates a NullPointerException. BufferedReader brs = new BufferedReader(new InputStreamReader(System.in)); String s1; String s2[];
string[] filesOfType1 = GetFileList1(); string[] filesOfType2 = GetFileList2(); var cookieMap = new Dictionary<string, CookieContainer>();
String incomingNumbers[ ] = writtenNumber.split(\\-); The program accepts natural language numbers such as thirty-two
string a = sea; string b = SEA if (a == b)... How could

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.