[Solved] C# Full-text search string format : string remove all adjacent duplicates and append with ‘AND’ ‘OR’ [closed]

Since you haven’t shown what you’ve done so far I’m assuming that you haven’t started on a solution, so here’s a high level algorithm: In that case, use String.Split(‘ ‘) to split the searchstring by each space. Use a foreach loop on the resulting array of strings and use string concatenation to complete, if a … Read more

[Solved] Java :- String search in proximity manner

Here is a very naive way without regex. public class NotElegant { public static void main(String[] args){ String text = “doctors found many cancer related chest problems in japan during second world war.”; String term = “cancer problems”; System.out.println(getWordsNearEachOther(text,term,3)); } public static String getWordsNearEachOther(String text, String term, int distance){ String word1= term.split(” “)[0]; String word2= … Read more