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

  • Home
  • SEARCH
  • 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 6809545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:05:57+00:00 2026-05-26T20:05:57+00:00

I have a string containing words that i need to match like the one

  • 0

I have a string containing words that i need to match like the one below, it is constant and the other string that can be changed may contain words from this string ‘s’.

string s = "run fun play game do work click type";

string g = "he will be running. He is playing a game by clicking the mouse";

I want to be be able to match these words and make them bold in a windows form application text box. Like run and Running match so running will be turned bold and so on. :-/ any ideas??

  • 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-26T20:05:58+00:00Added an answer on May 26, 2026 at 8:05 pm

    What I would do is use a stemmer (such as the Porter stemmer), split the strings using a split(‘ ‘) and go through each. Compare the stemmed version of both words and then bold the ones which match.

    foreach (string t1 in term1.split(' '){
    
    foreach (string t2 in term2.split(' '){
    
    if (Stemmer.Stem(t1).equals(Stemmer.Stem(t2)){
    
    //do whatever here
    
    }
    
    }    
    
        }
    

    On the porter stemmer including source code:

    http://tartarus.org/martin/PorterStemmer/

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

Sidebar

Related Questions

I have a string containing HTML and I need to replace some words to
I have a string containing byte data. How can I perform an in-place conversion
I have a string containing something like this Hello bla bla bla bla ok,
I have a string in c# containing some data i need to extract based
If I have an f# function that takes a string containing a sentence, what
If I have code like this: string s = MyClass.GetString(); // Returns string containing
I have a string containing something like this ... /\*start anythingCanBeEnteredHere end\*/ ... I
Hi I have made a program that reads a text file containing words and
I have 4 entities that are related as follows: LocalAgency<-0..1----1->Agency<-0..1----1->Organization<-0..1----1->Customer In other words, a
I have a GridView with Cell 0 containing the ID that I need 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.