search a keyword (query) in a big text
-
hi, firstly sorry for my bad english :) List _AllKWs = new {"simple", "object",...}; string lngText= "For most any Serializeable object, making a Debugger Visualizer is exceeding simple and examples abound. However, if you are trying to build a Debugger engin for an object which is not Serializable or takes too long to Serialize and Deserialize, things are not quite so simple......"; var sss = from kw in _AllKWs where longText.Contains(kw) select kw; foreach (string item in sss) { Console.WriteLine(item); } this code is very simple. The code above is searchs the kws in a big text and lists founded kws. but I want to do much complex. I chenged kWs like this : List _AllKWs = new {"Debugger NOT Debugger engin", "object AND Serializable",...}; 1. scenario it must find only "debugger". If the followed keyword is "engin" it won't be listed kw. 2. scenario I want to find "object" kw. But "Serializable" kw is must exist somewhere in the text. thanx...
-
hi, firstly sorry for my bad english :) List _AllKWs = new {"simple", "object",...}; string lngText= "For most any Serializeable object, making a Debugger Visualizer is exceeding simple and examples abound. However, if you are trying to build a Debugger engin for an object which is not Serializable or takes too long to Serialize and Deserialize, things are not quite so simple......"; var sss = from kw in _AllKWs where longText.Contains(kw) select kw; foreach (string item in sss) { Console.WriteLine(item); } this code is very simple. The code above is searchs the kws in a big text and lists founded kws. but I want to do much complex. I chenged kWs like this : List _AllKWs = new {"Debugger NOT Debugger engin", "object AND Serializable",...}; 1. scenario it must find only "debugger". If the followed keyword is "engin" it won't be listed kw. 2. scenario I want to find "object" kw. But "Serializable" kw is must exist somewhere in the text. thanx...
There's a powerful tool fur such things [^]. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
There's a powerful tool fur such things [^]. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
is it possible with LINQ or EXPRESIONs? are there any easy way? I can write some methods, yes, but I can't visualize that efficiency. by the way I don't now how to use REGEX :(
enginço wrote:
by the way I don't now how to use REGEX
Good time to learn. They're sooooooo powerful! :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
There's a powerful tool fur such things [^]. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]And here too. :| See here[^] :suss:
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Microsoft MVP - Visual C++[^]
-
And here too. :| See here[^] :suss:
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Microsoft MVP - Visual C++[^]
Thanks.
Rajesh R Subramanian wrote:
See here
Balanced. :-D
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
Thanks.
Rajesh R Subramanian wrote:
See here
Balanced. :-D
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]Occasionally I go to the "messages posted" page of yours (and a few others too), just to find and fix those unfair votes. A dirty job, but someone has to do it. :| Thanks for the vote BTW. :)
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Microsoft MVP - Visual C++[^]
-
Occasionally I go to the "messages posted" page of yours (and a few others too), just to find and fix those unfair votes. A dirty job, but someone has to do it. :| Thanks for the vote BTW. :)
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Microsoft MVP - Visual C++[^]
Rajesh R Subramanian wrote:
Occasionally I go to the "messages posted" page of yours (and a few others too), just to find and fix those unfair votes. A dirty job, but someone has to do it
I know I should do on yours, but, you know, I'm not lazy: I've a wife and a little child. :-D (just kidding: I will do the dirty job!) :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
Rajesh R Subramanian wrote:
Occasionally I go to the "messages posted" page of yours (and a few others too), just to find and fix those unfair votes. A dirty job, but someone has to do it
I know I should do on yours, but, you know, I'm not lazy: I've a wife and a little child. :-D (just kidding: I will do the dirty job!) :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]CPallini wrote:
I know I should do on yours, but, you know, I'm not lazy: I've a wife and a little child.
This time the wife and the kid gets a nice treatment. You are NOT lazy because of them. :-D
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Microsoft MVP - Visual C++[^]